public class FanoutTransport extends Object implements CompositeTransport
| Constructor and Description |
|---|
FanoutTransport() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(boolean reblance,
URI[] uris) |
FutureResponse |
asyncRequest(Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in
the future.
|
long |
getInitialReconnectDelay() |
int |
getMaxReconnectAttempts() |
long |
getMaxReconnectDelay() |
int |
getMinAckCount() |
X509Certificate[] |
getPeerCertificates() |
int |
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport.
|
long |
getReconnectDelayExponent() |
String |
getRemoteAddress() |
TransportListener |
getTransportListener()
Returns the current transport listener
|
WireFormat |
getWireFormat()
Retrieves the WireFormat instance associated with this Transport instance.
|
boolean |
isConnected() |
boolean |
isDisposed() |
boolean |
isFanOutQueues() |
boolean |
isFaultTolerant()
Indicates if the transport can handle faults
|
boolean |
isReconnectSupported() |
boolean |
isUpdateURIsSupported() |
<T> T |
narrow(Class<T> target) |
void |
oneway(Object o)
A one way asynchronous send
|
void |
reconnect() |
void |
reconnect(URI uri)
reconnect to another location
|
void |
remove(boolean rebalance,
URI[] uris) |
Object |
request(Object command)
A synchronous request response
|
Object |
request(Object command,
int timeout)
A synchronous request response
|
protected void |
restoreTransport(org.apache.activemq.transport.fanout.FanoutTransport.FanoutTransportHandler th) |
void |
setFanOutQueues(boolean fanOutQueues) |
void |
setInitialReconnectDelay(long initialReconnectDelay) |
void |
setMaxReconnectAttempts(int maxReconnectAttempts) |
void |
setMaxReconnectDelay(long maxReconnectDelay) |
void |
setMinAckCount(int minAckCount) |
void |
setPeerCertificates(X509Certificate[] certificates)
Sets the certificates provided by the connected peer.
|
void |
setReconnectDelayExponent(long reconnectDelayExponent) |
void |
setTransportListener(TransportListener commandListener)
Registers an inbound command listener
|
void |
start() |
void |
stop() |
protected void |
transportListenerOnCommand(Command command) |
void |
updateURIs(boolean reblance,
URI[] uris)
Provide a list of available alternative locations
|
public FanoutTransport()
public int getMinAckCount()
public void setMinAckCount(int minAckCount)
public long getInitialReconnectDelay()
public void setInitialReconnectDelay(long initialReconnectDelay)
public long getMaxReconnectDelay()
public void setMaxReconnectDelay(long maxReconnectDelay)
public long getReconnectDelayExponent()
public void setReconnectDelayExponent(long reconnectDelayExponent)
public int getMaxReconnectAttempts()
public void setMaxReconnectAttempts(int maxReconnectAttempts)
public void oneway(Object o) throws IOException
Transportoneway in interface TransportIOExceptionpublic FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
TransportasyncRequest in interface TransportresponseCallback - TODOIOExceptionpublic Object request(Object command) throws IOException
Transportrequest in interface TransportIOExceptionpublic Object request(Object command, int timeout) throws IOException
Transportrequest in interface TransportIOExceptionpublic void reconnect()
public TransportListener getTransportListener()
TransportgetTransportListener in interface Transportpublic void setTransportListener(TransportListener commandListener)
TransportsetTransportListener in interface Transportprotected void restoreTransport(org.apache.activemq.transport.fanout.FanoutTransport.FanoutTransportHandler th) throws Exception, IOException
ExceptionIOExceptionpublic void add(boolean reblance, URI[] uris)
add in interface CompositeTransportpublic void remove(boolean rebalance, URI[] uris)
remove in interface CompositeTransportpublic void reconnect(URI uri) throws IOException
Transportreconnect in interface TransportIOException - on failure of if not supportedpublic boolean isReconnectSupported()
isReconnectSupported in interface Transportpublic boolean isUpdateURIsSupported()
isUpdateURIsSupported in interface Transportpublic void updateURIs(boolean reblance, URI[] uris) throws IOException
TransportupdateURIs in interface TransportIOExceptionpublic String getRemoteAddress()
getRemoteAddress in interface Transportprotected void transportListenerOnCommand(Command command)
public boolean isFaultTolerant()
TransportisFaultTolerant in interface Transportpublic boolean isFanOutQueues()
public void setFanOutQueues(boolean fanOutQueues)
public boolean isDisposed()
isDisposed in interface Transportpublic boolean isConnected()
isConnected in interface Transportpublic int getReceiveCounter()
TransportgetReceiveCounter in interface Transportpublic X509Certificate[] getPeerCertificates()
getPeerCertificates in interface Transportpublic void setPeerCertificates(X509Certificate[] certificates)
TransportsetPeerCertificates in interface Transportcertificates - the Certificates provided by the peer.public WireFormat getWireFormat()
TransportgetWireFormat in interface TransportCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.