org.apache.wink.client.handlers
Interface ClientHandler

All Known Subinterfaces:
ConnectionHandler
All Known Implementing Classes:
org.apache.wink.client.internal.handlers.AbstractConnectionHandler, AsyncHttpClientConnectionHandler, BasicAuthSecurityHandler, ProxyAuthSecurityHandler

public interface ClientHandler

Interface that all client handlers must implement


Method Summary
 ClientResponse handle(ClientRequest request, HandlerContext context)
          This method is invoked for every request invocation to allow the handler to perform custom actions during the invocation.
 

Method Detail

handle

ClientResponse handle(ClientRequest request,
                      HandlerContext context)
                      throws java.lang.Exception
This method is invoked for every request invocation to allow the handler to perform custom actions during the invocation. This method may be called more that once for a single request, so handlers are must be prepared to handle such situations.

Parameters:
request - a modifiable ClientRequest containing the request details
context - the handler context
Returns:
a ClientResponse instance containing the response details
Throws:
java.lang.Exception - any exception can be thrown by a handler and it will be caught by the underlying client implementation and wrapped in a ClientRuntimeException


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