org.apache.qpid.jms.failover
Interface FailoverMethod

All Known Implementing Classes:
FailoverRoundRobinServers, FailoverSingleServer

public interface FailoverMethod


Field Summary
static java.lang.String RANDOM
           
static java.lang.String ROUND_ROBIN
           
static java.lang.String SINGLE_BROKER
           
 
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.
 java.lang.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 maxRetries)
          Set the retries for this method
 

Field Detail

SINGLE_BROKER

static final java.lang.String SINGLE_BROKER
See Also:
Constant Field Values

ROUND_ROBIN

static final java.lang.String ROUND_ROBIN
See Also:
Constant Field Values

RANDOM

static final java.lang.String RANDOM
See Also:
Constant Field Values
Method Detail

reset

void reset()
Reset the Failover to initial conditions


failoverAllowed

boolean failoverAllowed()
Check if failover is possible for this method

Returns:
true if failover is allowed

attainedConnection

void attainedConnection()
Notification to the Failover method that a connection has been attained.


getCurrentBrokerDetails

BrokerDetails getCurrentBrokerDetails()
If there is no current BrokerDetails the null will be returned.

Returns:
The current BrokerDetail value to use

getNextBrokerDetails

BrokerDetails getNextBrokerDetails()
Move to the next BrokerDetails if one is available.

Returns:
the next BrokerDetail or null if there is none.

setBroker

void setBroker(BrokerDetails broker)
Set the currently active broker to be the new value.

Parameters:
broker - The new BrokerDetail value

setRetries

void setRetries(int maxRetries)
Set the retries for this method

Parameters:
maxRetries - the maximum number of time to retry this Method

methodName

java.lang.String methodName()
Returns:
The name of this method for display purposes.