Class WebDavCompletionHandlerBase<T>

  • Type Parameters:
    T - the result type
    All Implemented Interfaces:
    AsyncHandler<T>

    public abstract class WebDavCompletionHandlerBase<T>
    extends Object
    implements AsyncHandler<T>
    Simple AsyncHandler that add support for WebDav's response manipulation.
    • Constructor Detail

      • WebDavCompletionHandlerBase

        public WebDavCompletionHandlerBase()
    • 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 interface AsyncHandler<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.
      • 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 interface AsyncHandler<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 interface AsyncHandler<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 interface AsyncHandler<T>
        Parameters:
        t - a Throwable
      • onCompleted

        public abstract T onCompleted​(WebDavResponse response)
                               throws Exception
        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 Future
        Throws:
        Exception - if something wrong happens