|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.jms.failover.FailoverSingleServer
public class FailoverSingleServer
Field Summary | |
---|---|
protected int |
_currentRetries
The current number of attempts made to the server |
protected int |
_retries
The number of times to retry connecting to the sever |
static int |
DEFAULT_SERVER_RETRIES
The default number of times to rety a conection to this server |
Fields inherited from interface org.apache.qpid.jms.failover.FailoverMethod |
---|
FAILOVER_EXCHANGE, NO_FAILOVER, RANDOM, ROUND_ROBIN, SINGLE_BROKER |
Constructor Summary | |
---|---|
FailoverSingleServer(BrokerDetails brokerDetail)
|
|
FailoverSingleServer(ConnectionURL connectionDetails)
|
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 |
reset()
Reset the Failover to initial conditions |
void |
setBroker(BrokerDetails broker)
Set the currently active broker to be the new value. |
void |
setRetries(int retries)
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 |
Field Detail |
---|
public static final int DEFAULT_SERVER_RETRIES
protected int _retries
protected int _currentRetries
Constructor Detail |
---|
public FailoverSingleServer(ConnectionURL connectionDetails)
public FailoverSingleServer(BrokerDetails brokerDetail)
Method Detail |
---|
public void reset()
FailoverMethod
reset
in interface FailoverMethod
public boolean failoverAllowed()
FailoverMethod
failoverAllowed
in interface FailoverMethod
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 void setBroker(BrokerDetails broker)
FailoverMethod
setBroker
in interface FailoverMethod
broker
- The new BrokerDetail valuepublic void setRetries(int retries)
FailoverMethod
setRetries
in interface FailoverMethod
retries
- 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 |