org.apache.qpid.jms.failover
Interface FailoverMethod

All Known Implementing Classes:
FailoverExchangeMethod, FailoverRoundRobinServers, FailoverSingleServer, NoFailover

public interface FailoverMethod


Field Summary
static String FAILOVER_EXCHANGE
           
static String NO_FAILOVER
           
static String RANDOM
           
static String ROUND_ROBIN
           
static 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.
 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 String SINGLE_BROKER
See Also:
Constant Field Values

ROUND_ROBIN

static final String ROUND_ROBIN
See Also:
Constant Field Values

FAILOVER_EXCHANGE

static final String FAILOVER_EXCHANGE
See Also:
Constant Field Values

RANDOM

static final String RANDOM
See Also:
Constant Field Values

NO_FAILOVER

static final String NO_FAILOVER
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

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


Licensed to the Apache Software Foundation