com.sun.jersey.api.client
Interface TerminatingClientHandler.RequestEntityWriterListener

Enclosing class:
TerminatingClientHandler

protected static interface TerminatingClientHandler.RequestEntityWriterListener

A lister for listensing to events when writing a request entity.

The listener is registered when invoking the TerminatingClientHandler.writeRequestEntity(com.sun.jersey.api.client.ClientRequest, com.sun.jersey.api.client.TerminatingClientHandler.RequestEntityWriterListener) method.

Author:
Paul.Sandoz@Sun.Com

Method Summary
 OutputStream onGetOutputStream()
          Called when the output stream is required to write the request entity.
 void onRequestEntitySize(long size)
          Called when the size of the request entity is obtained.
 

Method Detail

onRequestEntitySize

void onRequestEntitySize(long size)
                         throws IOException
Called when the size of the request entity is obtained.

Enables the appropriate setting of HTTP headers for the size of the request entity and/or configure an appropriate transport encoding.

Parameters:
size - the size, in bytes, of the request entity, otherwise -1 if the size cannot be determined before serialization.
Throws:
IOException

onGetOutputStream

OutputStream onGetOutputStream()
                               throws IOException
Called when the output stream is required to write the request entity.

Returns:
the output stream to write the request entity.
Throws:
IOException


Copyright © 2013 Oracle Corporation. All Rights Reserved.