org.rhq.enterprise.communications.command.client
Interface FailureCallback


public interface FailureCallback

Callback that is informed when communication failures are detected. Callbacks may also request that the failed message be retried.

Author:
John Mazzitelli

Method Summary
 boolean failureDetected(RemoteCommunicator remoteCommunicator, Command command, CommandResponse response, Throwable t)
          The callback method that is called when a failure is detected by a remote communicator.
 

Method Detail

failureDetected

boolean failureDetected(RemoteCommunicator remoteCommunicator,
                        Command command,
                        CommandResponse response,
                        Throwable t)
The callback method that is called when a failure is detected by a remote communicator. Implementations can indicate if the request should be retried by returning true.

Parameters:
remoteCommunicator - the communicator object that detected the failure
command - the command that was attempted to be sent but failed
response - the response of the command, if one was even received (this is normally null, but under some circumstances this might actually be a non-null object)
t - the actual exception that describes the failure - if this is null, the exception should be found in the exception field of the response
Returns:
true if the callback would like the communicator to retry the request; false if the failure should be considered unrecoverable and the communicator should continue with its error handling


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.