Class State<T>

java.lang.Object
com.mastfrog.netty.http.client.State<T>
Direct Known Subclasses:
State.Connected, State.ContentReceived, State.Error, State.Finished, State.FullContentReceived, State.HeadersReceived, State.Redirect, State.SendRequest, State.Timeout

public abstract class State<T> extends Object
Represents the current state of a request, used in notifications. Subclass types can be used as keys for describing what events to listen to in a way that carries type information.
Author:
Tim Boudreau
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    State event when a connection has been achieved; payload is the Channel; invoking close() on it will abort.
    static final class 
    State event triggered when one chunk of content has arrived; if the server is using chunked transfer encoding, this state will be fired once for each chunk; when the FullContentReceived event is fired, there will be no more ContentReceived events.
    static final class 
    State event triggered when an exception is thrown somewhere in processing of the request or response.
    static final class 
    Convenience state event providing the entire response and its body as a FullHttpResponse.
    static final class 
    State event triggered when the entire response body has arrived.
    static final class 
    State event triggered when the response header has arrived, but not the response body.
    static final class 
    State event triggered when a redirect is followed.
    static final class 
    State event when the HTTP request is about to be sent; payload is the HTTP request (you can still modify headers, etc at this point).
    static final class 
    State event triggered when a timeout occurs.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     
     
     
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details