Interface Collector

All Superinterfaces:
Entity
All Known Implementing Classes:
RequestCollector

interface Collector extends Entity
The Collector object is used to collect all of the data used to form a request entity. This will collect the data fragment by fragment from the underlying transport. When all of the data is consumed and the entity is created and then it is sent to the Controller object for processing. If the request has completed the next request can be collected from the underlying transport using a new collector object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    collect(Controller controller)
    This is used to collect the data from a Channel which is used to compose the entity.

    Methods inherited from interface org.simpleframework.http.message.Entity

    getBody, getChannel, getHeader, getTime
  • Method Details

    • collect

      void collect(Controller controller) throws IOException
      This is used to collect the data from a Channel which is used to compose the entity. If at any stage there are no ready bytes on the socket the controller provided can be used to queue the collector until such time as the socket is ready to read. Also, should the entity have completed reading all required content it is handed to the controller as ready, which processes the entity as a new client HTTP request.
      Parameters:
      controller - this is the controller used to queue this
      Throws:
      IOException