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
Transport
oneway
in interface Transport
IOException
public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
Transport
asyncRequest
in interface Transport
responseCallback
- TODOIOException
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 reconnect()
public TransportListener getTransportListener()
Transport
getTransportListener
in interface Transport
public void setTransportListener(TransportListener commandListener)
Transport
setTransportListener
in interface Transport
protected void restoreTransport(org.apache.activemq.transport.fanout.FanoutTransport.FanoutTransportHandler th) throws Exception, IOException
Exception
IOException
public void add(boolean reblance, URI[] uris)
add
in interface CompositeTransport
public void remove(boolean rebalance, URI[] uris)
remove
in interface CompositeTransport
public void reconnect(URI uri) throws IOException
Transport
reconnect
in interface Transport
IOException
- on failure of if not supportedpublic boolean isReconnectSupported()
isReconnectSupported
in interface Transport
public boolean isUpdateURIsSupported()
isUpdateURIsSupported
in interface Transport
public void updateURIs(boolean reblance, URI[] uris) throws IOException
Transport
updateURIs
in interface Transport
IOException
public String getRemoteAddress()
getRemoteAddress
in interface Transport
protected void transportListenerOnCommand(Command command)
public boolean isFaultTolerant()
Transport
isFaultTolerant
in interface Transport
public boolean isFanOutQueues()
public void setFanOutQueues(boolean fanOutQueues)
public boolean isDisposed()
isDisposed
in interface Transport
public boolean isConnected()
isConnected
in interface Transport
public int getReceiveCounter()
Transport
getReceiveCounter
in interface Transport
public X509Certificate[] getPeerCertificates()
getPeerCertificates
in interface Transport
public void setPeerCertificates(X509Certificate[] certificates)
Transport
setPeerCertificates
in interface Transport
certificates
- the Certificates provided by the peer.public WireFormat getWireFormat()
Transport
getWireFormat
in interface Transport
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.