org.apache.wink.client.handlers
Interface HandlerContext


public interface HandlerContext

The handler context is used by handlers to call the next handler on the chain. It is also used by handlers to modify the input and output streams for stream manipulations by using the InputStreamAdapter and the OutputStreamAdapter classes.


Method Summary
 void addInputStreamAdapter(InputStreamAdapter adapter)
          Add an InputStreamAdapter to adapt the response input stream
 void addOutputStreamAdapter(OutputStreamAdapter adapter)
          Add an OutputStreamAdapter to adapt the request output stream
 ClientResponse doChain(ClientRequest request)
          Call the next handler on the chain.
 java.util.List<InputStreamAdapter> getInputStreamAdapters()
          Get an unmodifiable list of input stream adapters
 java.util.List<OutputStreamAdapter> getOutputStreamAdapters()
          Get an unmodifiable list of output stream adapters
 

Method Detail

doChain

ClientResponse doChain(ClientRequest request)
                       throws java.lang.Exception
Call the next handler on the chain. A handler is permitted to call this method any number of times for the same request.

Parameters:
request - the request context
Returns:
the response context
Throws:
java.lang.Exception

addOutputStreamAdapter

void addOutputStreamAdapter(OutputStreamAdapter adapter)
Add an OutputStreamAdapter to adapt the request output stream

Parameters:
adapter - the OutputStreamAdapeter to add

addInputStreamAdapter

void addInputStreamAdapter(InputStreamAdapter adapter)
Add an InputStreamAdapter to adapt the response input stream

Parameters:
adapter - the InputStreamAdapeter to add

getOutputStreamAdapters

java.util.List<OutputStreamAdapter> getOutputStreamAdapters()
Get an unmodifiable list of output stream adapters

Returns:
unmodifiable list of output stream adapters

getInputStreamAdapters

java.util.List<InputStreamAdapter> getInputStreamAdapters()
Get an unmodifiable list of input stream adapters

Returns:
unmodifiable list of input stream adapters


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.