|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.jms.failover.FailoverExchangeMethod
public class FailoverExchangeMethod
When using the Failover exchange a single broker is supplied in the URL. The connection will then connect to the cluster using the above broker details. Once connected, the membership details of the cluster will be obtained via subscribing to a queue bound to the failover exchange. The failover exchange will provide a list of broker URLs in the format "transport:ip:port" Out of this list we only select brokers that match the transport of the original broker supplied in the connection URL. Also properties defined for the original broker will be applied to all the brokers selected from the list.
Field Summary |
---|
Fields inherited from interface org.apache.qpid.jms.failover.FailoverMethod |
---|
FAILOVER_EXCHANGE, NO_FAILOVER, RANDOM, ROUND_ROBIN, SINGLE_BROKER |
Constructor Summary | |
---|---|
FailoverExchangeMethod(ConnectionURL connectionDetails,
AMQConnection conn)
|
Method Summary | |
---|---|
void |
attainedConnection()
Notification to the Failover method that a connection has been attained. |
boolean |
failoverAllowed()
Check if failover is possible for this method |
BrokerDetails |
getCurrentBrokerDetails()
If there is no current BrokerDetails the null will be returned. |
BrokerDetails |
getNextBrokerDetails()
Move to the next BrokerDetails if one is available. |
String |
methodName()
|
void |
onMessage(Message m)
|
void |
reset()
Reset the Failover to initial conditions |
void |
setBroker(BrokerDetails broker)
Set the currently active broker to be the new value. |
void |
setRetries(int maxRetries)
Set the retries for this method |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FailoverExchangeMethod(ConnectionURL connectionDetails, AMQConnection conn)
Method Detail |
---|
public void onMessage(Message m)
onMessage
in interface MessageListener
public void attainedConnection()
FailoverMethod
attainedConnection
in interface FailoverMethod
public BrokerDetails getCurrentBrokerDetails()
FailoverMethod
getCurrentBrokerDetails
in interface FailoverMethod
public BrokerDetails getNextBrokerDetails()
FailoverMethod
getNextBrokerDetails
in interface FailoverMethod
public boolean failoverAllowed()
FailoverMethod
failoverAllowed
in interface FailoverMethod
public void reset()
FailoverMethod
reset
in interface FailoverMethod
public void setBroker(BrokerDetails broker)
FailoverMethod
setBroker
in interface FailoverMethod
broker
- The new BrokerDetail valuepublic void setRetries(int maxRetries)
FailoverMethod
setRetries
in interface FailoverMethod
maxRetries
- the maximum number of time to retry this Methodpublic String methodName()
methodName
in interface FailoverMethod
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |