Class StatusResponseHandler
java.lang.Object
org.apache.druid.java.util.http.client.response.StatusResponseHandler
- All Implemented Interfaces:
HttpResponseHandler<StatusResponseHolder,StatusResponseHolder>
public class StatusResponseHandler
extends Object
implements HttpResponseHandler<StatusResponseHolder,StatusResponseHolder>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.java.util.http.client.response.HttpResponseHandler
HttpResponseHandler.TrafficCop -
Method Summary
Modifier and TypeMethodDescriptiondone(ClientResponse<StatusResponseHolder> response) Called after the final handleResponse() or handleChunk() call, signifying that no more data will arrive.voidexceptionCaught(ClientResponse<StatusResponseHolder> clientResponse, Throwable e) static StatusResponseHandlerhandleChunk(ClientResponse<StatusResponseHolder> response, org.jboss.netty.handler.codec.http.HttpChunk chunk, long chunkNum) Called for chunked responses, indicating another HttpChunk has arrived.handleResponse(org.jboss.netty.handler.codec.http.HttpResponse response, HttpResponseHandler.TrafficCop trafficCop) Handles the initial HttpResponse object that comes back from Netty.
-
Method Details
-
getInstance
-
handleResponse
public ClientResponse<StatusResponseHolder> handleResponse(org.jboss.netty.handler.codec.http.HttpResponse response, HttpResponseHandler.TrafficCop trafficCop) Description copied from interface:HttpResponseHandlerHandles the initial HttpResponse object that comes back from Netty.- Specified by:
handleResponsein interfaceHttpResponseHandler<StatusResponseHolder,StatusResponseHolder> - Parameters:
response- response from NettytrafficCop- flow controller, allows resuming suspended reads- Returns:
- response that may be "finished" or "unfinished".
-
handleChunk
public ClientResponse<StatusResponseHolder> handleChunk(ClientResponse<StatusResponseHolder> response, org.jboss.netty.handler.codec.http.HttpChunk chunk, long chunkNum) Description copied from interface:HttpResponseHandlerCalled for chunked responses, indicating another HttpChunk has arrived.- Specified by:
handleChunkin interfaceHttpResponseHandler<StatusResponseHolder,StatusResponseHolder> - Parameters:
response- last response returned by the prior handleResponse() or handleChunk()chunk- the new chunk of datachunkNum- the sequence number of this chunk (increases monotonically)- Returns:
- response that may be "finished" or "unfinished".
-
done
Description copied from interface:HttpResponseHandlerCalled after the final handleResponse() or handleChunk() call, signifying that no more data will arrive.- Specified by:
donein interfaceHttpResponseHandler<StatusResponseHolder,StatusResponseHolder> - Parameters:
response- last response returned by handleResponse() or handleChunk()- Returns:
- response containing an object to hand back to the caller. It must be a "finished" response.
-
exceptionCaught
- Specified by:
exceptionCaughtin interfaceHttpResponseHandler<StatusResponseHolder,StatusResponseHolder>
-