org.apache.qpid.client.failover
Class FailoverHandler
java.lang.Object
org.apache.qpid.client.failover.FailoverHandler
- All Implemented Interfaces:
- java.lang.Runnable
public class FailoverHandler
- extends java.lang.Object
- implements java.lang.Runnable
When failover is required, we need a separate thread to handle the establishment of the new connection and
the transfer of subscriptions.
The reason this needs to be a separate thread is because you cannot do this work inside the MINA IO processor
thread. One significant task is the connection setup which involves a protocol exchange until a particular state
is achieved. However if you do this in the MINA thread, you have to block until the state is achieved which means
the IO processor is not able to do anything at all.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FailoverHandler
public FailoverHandler(AMQProtocolHandler amqProtocolHandler,
org.apache.mina.common.IoSession session)
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
getHost
public java.lang.String getHost()
setHost
public void setHost(java.lang.String host)
getPort
public int getPort()
setPort
public void setPort(int port)