Class ContinueDispatcher

java.lang.Object
org.simpleframework.http.message.ContinueDispatcher

class ContinueDispatcher extends Object
The ContinueDispatcher object is used to send the HTTP 100 continue status if required. This is delivered to the client to tell the client that the server is willing to accept the request body. Once this is sent the transport will likely wait until there is a read ready event.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final byte[]
    This is the optional description for the expect status code.
    private static final byte[]
    This is the status code that is sent to prompt the client.
    private final Trace
    This is the trace used to capture a continue response if any.
    private final ByteWriter
    This is the writer that is used to deliver the continue.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the ContinueDispatcher object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(Header header)
    This will execute the continue if the header contains the expectation header.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • STATUS

      private static final byte[] STATUS
      This is the status code that is sent to prompt the client.
    • MESSAGE

      private static final byte[] MESSAGE
      This is the optional description for the expect status code.
    • writer

      private final ByteWriter writer
      This is the writer that is used to deliver the continue.
    • trace

      private final Trace trace
      This is the trace used to capture a continue response if any.
  • Constructor Details

    • ContinueDispatcher

      public ContinueDispatcher(Channel channel)
      Constructor for the ContinueDispatcher object. This will create an object that will deliver the continue status code. Because the transport performs an asynchronous write this will not block the execution of this method and delay execution.
      Parameters:
      channel - this is the channel used to deliver the prompt
  • Method Details

    • execute

      public void execute(Header header) throws IOException
      This will execute the continue if the header contains the expectation header. If there is no expectation then this will return without sending anything back to the connected client.
      Parameters:
      header - this is the header read from the channel
      Throws:
      IOException