Package org.asynchttpclient.webdav
Class WebDavCompletionHandlerBase<T>
- java.lang.Object
-
- org.asynchttpclient.webdav.WebDavCompletionHandlerBase<T>
-
- Type Parameters:
T
- the result type
- All Implemented Interfaces:
AsyncHandler<T>
public abstract class WebDavCompletionHandlerBase<T> extends Object implements AsyncHandler<T>
SimpleAsyncHandler
that add support for WebDav's response manipulation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.asynchttpclient.AsyncHandler
AsyncHandler.State
-
-
Constructor Summary
Constructors Constructor Description WebDavCompletionHandlerBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AsyncHandler.State
onBodyPartReceived(HttpResponseBodyPart content)
Invoked as soon as some response body part are received.T
onCompleted()
Invoked once the HTTP response processing is finished.abstract T
onCompleted(WebDavResponse response)
Invoked once the HTTP response has been fully read.AsyncHandler.State
onHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers)
Invoked as soon as the HTTP headers have been received.AsyncHandler.State
onStatusReceived(HttpResponseStatus status)
Invoked as soon as the HTTP status line has been receivedvoid
onThrowable(Throwable t)
Invoked when an unexpected exception occurs during the processing of the response.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.asynchttpclient.AsyncHandler
onConnectionOffer, onConnectionPoolAttempt, onConnectionPooled, onHostnameResolutionAttempt, onHostnameResolutionFailure, onHostnameResolutionSuccess, onRequestSend, onRetry, onTcpConnectAttempt, onTcpConnectFailure, onTcpConnectSuccess, onTlsHandshakeAttempt, onTlsHandshakeFailure, onTlsHandshakeSuccess, onTrailingHeadersReceived
-
-
-
-
Method Detail
-
onBodyPartReceived
public final AsyncHandler.State onBodyPartReceived(HttpResponseBodyPart content)
Description copied from interface:AsyncHandler
Invoked as soon as some response body part are received. Could be invoked many times. Beware that, depending on the provider (Netty) this can be notified with empty body parts.- Specified by:
onBodyPartReceived
in interfaceAsyncHandler<T>
- Parameters:
content
- response's body part.- Returns:
- a
AsyncHandler.State
telling to CONTINUE or ABORT the current processing. Aborting will also close the connection.
-
onStatusReceived
public final AsyncHandler.State onStatusReceived(HttpResponseStatus status)
Description copied from interface:AsyncHandler
Invoked as soon as the HTTP status line has been received- Specified by:
onStatusReceived
in interfaceAsyncHandler<T>
- Parameters:
status
- the status code and test of the response- Returns:
- a
AsyncHandler.State
telling to CONTINUE or ABORT the current processing.
-
onHeadersReceived
public final AsyncHandler.State onHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers)
Description copied from interface:AsyncHandler
Invoked as soon as the HTTP headers have been received.- Specified by:
onHeadersReceived
in interfaceAsyncHandler<T>
- Parameters:
headers
- the HTTP headers.- Returns:
- a
AsyncHandler.State
telling to CONTINUE or ABORT the current processing.
-
onCompleted
public final T onCompleted() throws Exception
Description copied from interface:AsyncHandler
Invoked once the HTTP response processing is finished.
Gets always invoked as last callback method.- Specified by:
onCompleted
in interfaceAsyncHandler<T>
- 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 interface:AsyncHandler
Invoked when an unexpected exception occurs during the processing of the response. The exception may have been produced by implementation of onXXXReceived method invocation.- Specified by:
onThrowable
in interfaceAsyncHandler<T>
- Parameters:
t
- aThrowable
-
-