|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.transport.failover.FailoverTransport
public class FailoverTransport
A Transport that is made reliable by being able to fail over to another transport when a transport failure is detected.
Constructor Summary | |
---|---|
FailoverTransport()
|
Method Summary | |
---|---|
void |
add(String u)
|
void |
add(URI[] u)
|
FutureResponse |
asyncRequest(Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in the future. |
Transport |
getConnectedTransport()
|
URI |
getConnectedTransportURI()
|
long |
getInitialReconnectDelay()
|
int |
getMaxReconnectAttempts()
|
long |
getMaxReconnectDelay()
|
long |
getReconnectDelay()
|
long |
getReconnectDelayExponent()
|
String |
getRemoteAddress()
|
TransportListener |
getTransportListener()
Returns the current transport listener |
boolean |
isRandomize()
|
boolean |
isUseExponentialBackOff()
|
Object |
narrow(Class target)
|
void |
oneway(Object o)
A one way asynchronous send |
void |
reconnect()
|
void |
remove(URI[] u)
|
Object |
request(Object command)
A synchronous request response |
Object |
request(Object command,
int timeout)
A synchronous request response |
protected void |
restoreTransport(Transport t)
|
void |
setInitialReconnectDelay(long initialReconnectDelay)
|
void |
setMaxReconnectAttempts(int maxReconnectAttempts)
|
void |
setMaxReconnectDelay(long maxReconnectDelay)
|
void |
setRandomize(boolean randomize)
|
void |
setReconnectDelay(long reconnectDelay)
|
void |
setReconnectDelayExponent(long reconnectDelayExponent)
|
void |
setTransportListener(TransportListener commandListener)
Registers an inbound command listener |
void |
setUseExponentialBackOff(boolean useExponentialBackOff)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FailoverTransport() throws InterruptedIOException
InterruptedIOException
Method Detail |
---|
public void start() throws Exception
start
in interface Service
Exception
public void stop() throws Exception
stop
in interface Service
Exception
public long getInitialReconnectDelay()
public void setInitialReconnectDelay(long initialReconnectDelay)
public long getMaxReconnectDelay()
public void setMaxReconnectDelay(long maxReconnectDelay)
public long getReconnectDelay()
public void setReconnectDelay(long reconnectDelay)
public long getReconnectDelayExponent()
public void setReconnectDelayExponent(long reconnectDelayExponent)
public Transport getConnectedTransport()
public URI getConnectedTransportURI()
public int getMaxReconnectAttempts()
public void setMaxReconnectAttempts(int maxReconnectAttempts)
public boolean isRandomize()
public void setRandomize(boolean randomize)
randomize
- The randomize to set.public void oneway(Object o) throws IOException
Transport
oneway
in interface Transport
IOException
public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
Transport
asyncRequest
in interface Transport
responseCallback
- TODO
IOException
public Object request(Object command) throws IOException
Transport
request
in interface Transport
IOException
public Object request(Object command, int timeout) throws IOException
Transport
request
in interface Transport
IOException
public void add(URI[] u)
add
in interface CompositeTransport
public void remove(URI[] u)
remove
in interface CompositeTransport
public void add(String u)
public void reconnect()
public TransportListener getTransportListener()
Transport
getTransportListener
in interface Transport
public void setTransportListener(TransportListener commandListener)
Transport
setTransportListener
in interface Transport
public Object narrow(Class target)
narrow
in interface Transport
protected void restoreTransport(Transport t) throws Exception, IOException
Exception
IOException
public boolean isUseExponentialBackOff()
public void setUseExponentialBackOff(boolean useExponentialBackOff)
public String toString()
toString
in class Object
public String getRemoteAddress()
getRemoteAddress
in interface Transport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |