org.apache.wink.client.handlers
Interface ClientHandler
- All Known Subinterfaces:
- ConnectionHandler
public interface ClientHandler
Interface that all client handlers must implement
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
detailscontext
- 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 The Apache Software Foundation. All Rights Reserved.