|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.api.client.RequestWriter
public class RequestWriter
A request writer for writing header values and a request entity.
Nested Class Summary | |
---|---|
protected static interface |
RequestWriter.RequestEntityWriter
A writer for writing a request entity. |
protected static interface |
RequestWriter.RequestEntityWriterListener
A lister for listening to events when writing a request entity. |
Field Summary | |
---|---|
protected static java.lang.annotation.Annotation[] |
EMPTY_ANNOTATIONS
|
Constructor Summary | |
---|---|
RequestWriter()
|
|
RequestWriter(MessageBodyWorkers workers)
|
Method Summary | |
---|---|
MessageBodyWorkers |
getMessageBodyWorkers()
|
protected RequestWriter.RequestEntityWriter |
getRequestEntityWriter(ClientRequest ro)
Get a request entity writer capable of writing the request entity. |
protected java.lang.String |
headerValueToString(java.lang.Object headerValue)
Convert a header value to a String instance. |
void |
setMessageBodyWorkers(MessageBodyWorkers workers)
|
protected void |
writeRequestEntity(ClientRequest ro,
RequestWriter.RequestEntityWriterListener listener)
Write a request entity using an appropriate message body writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.annotation.Annotation[] EMPTY_ANNOTATIONS
Constructor Detail |
---|
public RequestWriter()
public RequestWriter(MessageBodyWorkers workers)
Method Detail |
---|
@Context public void setMessageBodyWorkers(MessageBodyWorkers workers)
public MessageBodyWorkers getMessageBodyWorkers()
protected java.lang.String headerValueToString(java.lang.Object headerValue)
This method defers to ClientRequest.getHeaderValue(java.lang.Object)
.
headerValue
- the header value.
protected RequestWriter.RequestEntityWriter getRequestEntityWriter(ClientRequest ro)
ro
- the client request.
protected void writeRequestEntity(ClientRequest ro, RequestWriter.RequestEntityWriterListener listener) throws java.io.IOException
The method RequestWriter.RequestEntityWriterListener.onRequestEntitySize(long)
will be invoked
with the size of the request entity to be serialized.
The method RequestWriter.RequestEntityWriterListener.onGetOutputStream()
will be invoked
when the output stream is required to write the request entity.
ro
- the client request containing the request entity. If the
request entity is null then the method will not write any entity.listener
- the request entity listener.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |