com.ning.http.client
Class AsyncCompletionHandlerBase

java.lang.Object
  extended by com.ning.http.client.AsyncCompletionHandler<Response>
      extended by com.ning.http.client.AsyncCompletionHandlerBase
All Implemented Interfaces:
AsyncHandler<Response>, ProgressAsyncHandler<Response>
Direct Known Subclasses:
TransferCompletionHandler

public class AsyncCompletionHandlerBase
extends AsyncCompletionHandler<Response>

Simple AsyncHandler of type Response


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ning.http.client.AsyncHandler
AsyncHandler.STATE
 
Constructor Summary
AsyncCompletionHandlerBase()
           
 
Method Summary
 Response onCompleted(Response response)
          Invoked once the HTTP response processing is finished.
 void onThrowable(Throwable t)
          Invoked when an unexpected exception occurs during the processing of the response.
 
Methods inherited from class com.ning.http.client.AsyncCompletionHandler
onBodyPartReceived, onCompleted, onContentWriteCompleted, onContentWriteProgress, onHeadersReceived, onHeaderWriteCompleted, onStatusReceived
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncCompletionHandlerBase

public AsyncCompletionHandlerBase()
Method Detail

onCompleted

public Response onCompleted(Response response)
                     throws Exception
Description copied from class: AsyncCompletionHandler
Invoked once the HTTP response processing is finished.

Gets always invoked as last callback method.

Specified by:
onCompleted in class AsyncCompletionHandler<Response>
Parameters:
response - The Response
Returns:
T Value that will be returned by the associated Future
Throws:
Exception - if something wrong happens

onThrowable

public void onThrowable(Throwable t)
Description copied from class: AsyncCompletionHandler
Invoked when an unexpected exception occurs during the processing of the response. The exception may have been produced by implementation of onXXXReceived method invokation.

Specified by:
onThrowable in interface AsyncHandler<Response>
Overrides:
onThrowable in class AsyncCompletionHandler<Response>
Parameters:
t - a Throwable


Copyright © 2011. All Rights Reserved.