|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.client.failover.FailoverHandler
public class FailoverHandler
FailoverHandler is a continuation that performs the failover procedure on a protocol session. As described in the
class level comment for AMQProtocolHandler
, a protocol connection can span many physical transport
connections, failing over to a new connection if the transport connection fails. The procedure to establish a new
connection is expressed as a continuation, in order that it may be run in a seperate thread to the i/o thread that
detected the failure and is used to handle the communication to establish a new connection.
FailoverException
and gets the protocol connection handler to propagate this event to all
interested parties.AMQStateManager
and re-established the connection through it.Responsibilities | Collaborations |
---|---|
Update fail-over state | AMQProtocolHandler
|
AMQDisconnectedException
and passes it to the AMQConnection. No need to use an
exception-as-argument here, could just as easily call a specific method for this purpose on AMQConnection., Creates a FailoverException
and propagates it to the MethodHandlers. No need to use an
exception-as-argument here, could just as easily call a specific method for this purpose on
AMQMethodListener
.Constructor Summary | |
---|---|
FailoverHandler(AMQProtocolHandler amqProtocolHandler)
Creates a failover handler on a protocol session, for a particular MINA session (network connection). |
Method Summary | |
---|---|
void |
run()
Performs the failover procedure. |
void |
setHost(String host)
Sets the host name to fail over to. |
void |
setPort(int port)
Sets the port to fail over to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FailoverHandler(AMQProtocolHandler amqProtocolHandler)
amqProtocolHandler
- The protocol handler that spans the failover.Method Detail |
---|
public void run()
FailoverHandler
, for a description of the
failover procedure.
run
in interface Runnable
public void setHost(String host)
host
- The host name to fail over to.public void setPort(int port)
port
- The port to fail over to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |