public abstract class

WebDavCompletionHandlerBase

extends Object
implements AsyncHandler<T>
java.lang.Object
   ↳ com.ning.http.client.webdav.WebDavCompletionHandlerBase<T>

Class Overview

Simple AsyncHandler that add support for WebDav's response manipulation.

Summary

Public Constructors
WebDavCompletionHandlerBase()
Public Methods
final AsyncHandler.STATE onBodyPartReceived(HttpResponseBodyPart content)
Invoked as soon as some response body part are received.
final T onCompleted()
Invoked once the HTTP response processing is finished.
abstract T onCompleted(WebDavResponse response)
Invoked once the HTTP response has been fully read.
final AsyncHandler.STATE onHeadersReceived(HttpResponseHeaders headers)
Invoked as soon as the HTTP headers has been received.
final AsyncHandler.STATE onStatusReceived(HttpResponseStatus status)
Invoked as soon as the HTTP status line has been received
void onThrowable(Throwable t)
Invoked when an unexpected exception occurs during the processing of the response.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ning.http.client.AsyncHandler

Public Constructors

public WebDavCompletionHandlerBase ()

Public Methods

public final AsyncHandler.STATE onBodyPartReceived (HttpResponseBodyPart content)

Invoked as soon as some response body part are received. Could be invoked many times.

Parameters
content response's body part.
Returns
Throws
Exception

public final T onCompleted ()

Invoked once the HTTP response processing is finished.

Gets always invoked as last callback method.

Returns
  • T Value that will be returned by the associated java.util.concurrent.Future
Throws
Exception

public abstract T onCompleted (WebDavResponse response)

Invoked once the HTTP response has been fully read.

Parameters
response The Response
Returns
  • Type of the value that will be returned by the associated java.util.concurrent.Future
Throws
Exception

public final AsyncHandler.STATE onHeadersReceived (HttpResponseHeaders headers)

Invoked as soon as the HTTP headers has been received. Can potentially be invoked more than once if a broken server sent trailing headers.

Parameters
headers the HTTP headers.
Returns
Throws
Exception

public final AsyncHandler.STATE onStatusReceived (HttpResponseStatus status)

Invoked as soon as the HTTP status line has been received

Parameters
status the status code and test of the response
Returns
Throws
Exception

public void onThrowable (Throwable t)

Invoked when an unexpected exception occurs during the processing of the response. The exception may have been produced by implementation of onXXXReceived method invocation.

Parameters
t a Throwable