org.glassfish.jersey.client
Class RequestWriter
java.lang.Object
org.glassfish.jersey.client.RequestWriter
public class RequestWriter
- extends Object
A request writer for writing header values and a request entity.
- Author:
- Paul Sandoz
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_ANNOTATIONS
protected static final Annotation[] EMPTY_ANNOTATIONS
RequestWriter
public RequestWriter()
getRequestEntityWriter
protected RequestWriter.RequestEntityWriter getRequestEntityWriter(javax.ws.rs.core.Request request)
- Get a request entity writer capable of writing the request entity.
- Parameters:
request - the client request.
- Returns:
- the request entity writer.
writeRequestEntity
protected void writeRequestEntity(javax.ws.rs.core.Request request,
RequestWriter.RequestEntityWriterListener listener)
throws IOException
- Write a request entity using an appropriate message body writer.
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.
- Parameters:
request - 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.
- Throws:
IOException
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.