org.codegist.crest.handler
Class ErrorDelegatorHandler

java.lang.Object
  extended by org.codegist.crest.handler.ErrorDelegatorHandler
All Implemented Interfaces:
ErrorHandler

public class ErrorDelegatorHandler
extends Object
implements ErrorHandler

Error handler that always delegate the given exception to the caller.

Author:
Laurent Gilles (laurent.gilles@codegist.org)

Constructor Summary
ErrorDelegatorHandler()
           
 
Method Summary
<T> T
handle(ResponseContext context, Exception e)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorDelegatorHandler

public ErrorDelegatorHandler()
Method Detail

handle

public <T> T handle(ResponseContext context,
                    Exception e)
         throws Exception
Specified by:
handle in interface ErrorHandler
Type Parameters:
T - Expected return type
Parameters:
context - Current response context. Inner HttpResponse if not guaranteed to be available as an error could have occured during request generation lifecycle step.
e - Exception occured
Returns:
any value of the expected error type when exception is ignored
Throws:
Exception - Any thrown exception while be delegated to the client using the relative rest interface.
See Also:
ErrorHandler


Copyright © 2011. All Rights Reserved.