org.apache.qpid.client.failover
Class FailoverException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.qpid.client.failover.FailoverException
All Implemented Interfaces:
Serializable

public class FailoverException
extends Exception

FailoverException is used to indicate that a synchronous request has failed to receive the reply that it is waiting for because the fail-over process has been started whilst it was waiting for its reply. Synchronous methods generally raise this exception to indicate that they must be re-tried once the fail-over process has completed.

CRC Card
Responsibilities Collaborations
Used to indicate failure of a synchronous request due to fail-over.

See Also:
Serialized Form
Todo:
This exception is created and passed as an argument to a method, rather than thrown. The exception is being used to represent an event, passed out to other threads. Use of exceptions as arguments rather than as exceptions is extremly confusing. Ideally use a condition or set a flag and check it instead. This exceptions-as-events pattern seems to be in a similar style to Mina code, which is not pretty, but potentially acceptable for that reason. We have the option of extending the mina model to add more events to it, that is, anything that is interested in handling failover as an event occurs below the main amq event handler, which knows the specific interface of the qpid handlers, which can pass this down as an explicit event, without it being an exception. Add failover method to BlockingMethodFrameListener, have it set a flag or interrupt the waiting thread, which then creates and raises this exception.

Constructor Summary
FailoverException(String message)
           
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FailoverException

public FailoverException(String message)


Licensed to the Apache Software Foundation