|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.http.message.EntityConsumer
public class EntityConsumer
The EntityConsumer object is used to consume data
from a cursor and build a request entity. Each constituent part of
the entity is consumed from the pipeline and can be acquired from
this consumer object. The Header and Body
can be used to extract the individual parts of the entity.
| Field Summary | |
|---|---|
protected BodyConsumer |
body
This is used to consume the body for the request entity. |
protected org.simpleframework.http.message.ContinueDispatcher |
dispatcher
This is used to determine if there a continue is expected. |
protected org.simpleframework.http.message.ConsumerFactory |
factory
This is used to create a body consumer for the entity. |
protected RequestConsumer |
header
This is used to consume the header for the request entity. |
protected Trace |
trace
This is used to trace the progress of the request consumption. |
| Constructor Summary | |
|---|---|
EntityConsumer(Allocator allocator,
Channel channel)
Constructor for the EntityConsumer object. |
|
| Method Summary | |
|---|---|
void |
consume(ByteCursor cursor)
This consumes the header and body from the cursor. |
Body |
getBody()
This is used to acquire the body for this HTTP entity. |
Header |
getHeader()
This provides the HTTP request header for the entity. |
boolean |
isFinished()
This is determined finished when the body has been consumed. |
boolean |
isHeaderFinished()
This is used to determine if the header has finished. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.simpleframework.http.message.ContinueDispatcher dispatcher
protected org.simpleframework.http.message.ConsumerFactory factory
protected RequestConsumer header
protected BodyConsumer body
protected Trace trace
| Constructor Detail |
|---|
public EntityConsumer(Allocator allocator,
Channel channel)
EntityConsumer object. This
is used to build an entity from the constituent parts. Once
all of the parts have been consumed they are available from
the exposed methods of this consumed instance.
allocator - this is used to allocate the memory usedchannel - this is the channel used to send a response| Method Detail |
|---|
public Body getBody()
Attachment objects.
Each part can then be read as an individual message.
public Header getHeader()
public void consume(ByteCursor cursor)
throws IOException
consume in interface ByteConsumercursor - used to consumed the bytes for the entity
IOExceptionpublic boolean isFinished()
isFinished in interface ByteConsumerpublic boolean isHeaderFinished()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||