Package org.simpleframework.http.core
Interface Collector
-
- All Superinterfaces:
Entity
- All Known Implementing Classes:
RequestCollector
interface Collector extends Entity
TheCollector
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 theController
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
collect(Controller controller)
This is used to collect the data from aChannel
which is used to compose the entity.-
Methods inherited from interface org.simpleframework.http.message.Entity
getBody, getChannel, getHeader, getTime
-
-
-
-
Method Detail
-
collect
void collect(Controller controller) throws java.io.IOException
This is used to collect the data from aChannel
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:
java.io.IOException
-
-