Interface RestChannel

All Known Implementing Classes:
AbstractRestChannel, DefaultRestChannel

public interface RestChannel
A channel used to construct bytes / builder based outputs, and send responses.
  • Method Summary

    Modifier and Type Method Description
    BytesStreamOutput bytesOutput()  
    boolean detailedErrorsEnabled()  
    org.elasticsearch.common.xcontent.XContentBuilder newBuilder()  
    org.elasticsearch.common.xcontent.XContentBuilder newBuilder​(org.elasticsearch.common.xcontent.XContentType xContentType, boolean useFiltering)  
    org.elasticsearch.common.xcontent.XContentBuilder newBuilder​(org.elasticsearch.common.xcontent.XContentType xContentType, org.elasticsearch.common.xcontent.XContentType responseContentType, boolean useFiltering)  
    org.elasticsearch.common.xcontent.XContentBuilder newErrorBuilder()  
    RestRequest request()  
    void sendResponse​(RestResponse response)  
  • Method Details

    • newBuilder

      org.elasticsearch.common.xcontent.XContentBuilder newBuilder() throws java.io.IOException
      Throws:
      java.io.IOException
    • newErrorBuilder

      org.elasticsearch.common.xcontent.XContentBuilder newErrorBuilder() throws java.io.IOException
      Throws:
      java.io.IOException
    • newBuilder

      org.elasticsearch.common.xcontent.XContentBuilder newBuilder​(@Nullable org.elasticsearch.common.xcontent.XContentType xContentType, boolean useFiltering) throws java.io.IOException
      Throws:
      java.io.IOException
    • newBuilder

      org.elasticsearch.common.xcontent.XContentBuilder newBuilder​(@Nullable org.elasticsearch.common.xcontent.XContentType xContentType, @Nullable org.elasticsearch.common.xcontent.XContentType responseContentType, boolean useFiltering) throws java.io.IOException
      Throws:
      java.io.IOException
    • bytesOutput

      BytesStreamOutput bytesOutput()
    • request

      RestRequest request()
    • detailedErrorsEnabled

      boolean detailedErrorsEnabled()
      Returns:
      true iff an error response should contain additional details like exception traces.
    • sendResponse

      void sendResponse​(RestResponse response)