Package org.apache.druid.discovery
Class DataServerResponseHandler
java.lang.Object
org.apache.druid.discovery.DataServerResponseHandler
- All Implemented Interfaces:
HttpResponseHandler<InputStream,InputStream>
public class DataServerResponseHandler
extends Object
implements HttpResponseHandler<InputStream,InputStream>
Response handler for the
DataServerClient. Handles the input stream from the data server and handles updating
the ResponseContext from the header. Does not apply backpressure or query timeout.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.java.util.http.client.response.HttpResponseHandler
HttpResponseHandler.TrafficCop -
Constructor Summary
ConstructorsConstructorDescriptionDataServerResponseHandler(Query<?> query, ResponseContext responseContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptiondone(ClientResponse<InputStream> clientResponse) voidexceptionCaught(ClientResponse<InputStream> clientResponse, Throwable e) handleChunk(ClientResponse<InputStream> clientResponse, org.jboss.netty.handler.codec.http.HttpChunk chunk, long chunkNum) handleResponse(org.jboss.netty.handler.codec.http.HttpResponse response, HttpResponseHandler.TrafficCop trafficCop)
-
Constructor Details
-
DataServerResponseHandler
public DataServerResponseHandler(Query<?> query, ResponseContext responseContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
handleResponse
public ClientResponse<InputStream> handleResponse(org.jboss.netty.handler.codec.http.HttpResponse response, HttpResponseHandler.TrafficCop trafficCop) - Specified by:
handleResponsein interfaceHttpResponseHandler<InputStream,InputStream>
-
handleChunk
public ClientResponse<InputStream> handleChunk(ClientResponse<InputStream> clientResponse, org.jboss.netty.handler.codec.http.HttpChunk chunk, long chunkNum) - Specified by:
handleChunkin interfaceHttpResponseHandler<InputStream,InputStream>
-
done
- Specified by:
donein interfaceHttpResponseHandler<InputStream,InputStream>
-
exceptionCaught
- Specified by:
exceptionCaughtin interfaceHttpResponseHandler<InputStream,InputStream>
-