|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemq.transport.TransportChannelSupport
org.activemq.transport.composite.CompositeTransportChannel
public class CompositeTransportChannel
A Compsite implementation of a TransportChannel
| Field Summary | |
|---|---|
protected TransportChannel |
channel
|
protected SynchronizedBoolean |
closed
|
protected URI |
currentURI
|
protected long |
establishConnectionTimeout
|
protected long |
failureSleepTime
|
protected boolean |
incrementTimeout
|
protected int |
maximumRetries
|
protected long |
maximumTimeout
|
protected SynchronizedBoolean |
started
|
protected List |
uris
|
| Fields inherited from class org.activemq.transport.TransportChannelSupport |
|---|
cachingEnabled, currentWireFormat, noDelay, pendingStop, transportConnected, usedInternally |
| Constructor Summary | |
|---|---|
CompositeTransportChannel(WireFormat wireFormat)
|
|
CompositeTransportChannel(WireFormat wireFormat,
List uris)
|
|
| Method Summary | |
|---|---|
void |
asyncSend(Packet packet)
Asynchronously send a Packet |
ReceiptHolder |
asyncSendWithReceipt(Packet packet)
Asynchronously send a Packet with receipt. |
protected void |
attemptToConnect(URI uri)
|
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
protected void |
configureChannel()
|
protected void |
establishConnection(long timeout)
|
protected URI |
extractURI(List list)
|
void |
forceDisconnect()
Forces disconnect by delegating to the child channel |
TransportChannel |
getChannel()
Access to the current channel if one is active |
int |
getCurrentWireFormatVersion()
|
long |
getEstablishConnectionTimeout()
Return the maximum amount of time spent trying to establish a connection or a negative number to keep going forever |
long |
getFailureSleepTime()
|
long |
getLastReceiptTimestamp()
Gets the timestamp of the last received receipt packet. |
int |
getMaximumRetries()
|
long |
getMaximumTimeout()
|
List |
getUris()
|
boolean |
isIncrementTimeout()
|
boolean |
isMulticast()
|
boolean |
isTransportConnected()
|
Receipt |
send(Packet packet)
synchronously send a Packet |
Receipt |
send(Packet packet,
int timeout)
Synchronously send a Packet |
void |
setClientID(String clientID)
Provides a way to specify the client ID that this channel is using |
void |
setEstablishConnectionTimeout(long establishConnectionTimeout)
|
void |
setExceptionListener(ExceptionListener listener)
Set an exception listener to listen for asynchronously generated exceptions |
void |
setFailureSleepTime(long failureSleepTime)
|
void |
setIncrementTimeout(boolean incrementTimeout)
|
void |
setMaximumRetries(int maximumRetries)
|
void |
setMaximumTimeout(long maximumTimeout)
|
void |
setPacketListener(PacketListener listener)
Set a listener for Packets |
void |
setUris(List list)
|
void |
start()
Called to start the service |
void |
statusChanged(TransportStatusEvent event)
called when the status of a transport channel changes |
void |
stop()
close the channel |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected List uris
protected URI currentURI
protected TransportChannel channel
protected SynchronizedBoolean closed
protected SynchronizedBoolean started
protected int maximumRetries
protected long failureSleepTime
protected long establishConnectionTimeout
protected long maximumTimeout
protected boolean incrementTimeout
| Constructor Detail |
|---|
public CompositeTransportChannel(WireFormat wireFormat)
public CompositeTransportChannel(WireFormat wireFormat,
List uris)
| Method Detail |
|---|
public String toString()
toString in class Object
public void start()
throws JMSException
Service
start in interface Servicestart in interface TransportChannelJMSException - if an error occurspublic void stop()
stop in interface Servicestop in interface TransportChannelstop in class TransportChannelSupportpublic void forceDisconnect()
forceDisconnect in interface TransportChannel
public Receipt send(Packet packet)
throws JMSException
TransportChannelSupport
send in interface TransportChannelsend in class TransportChannelSupportJMSException
public Receipt send(Packet packet,
int timeout)
throws JMSException
TransportChannelSupport
send in interface TransportChannelsend in class TransportChannelSupportpacket - packet to sendtimeout - amount of time to wait for a receipt
JMSException
public void asyncSend(Packet packet)
throws JMSException
TransportChannel
asyncSend in interface TransportChannelpacket - the packet to send
JMSException
public ReceiptHolder asyncSendWithReceipt(Packet packet)
throws JMSException
TransportChannelSupport
asyncSendWithReceipt in interface TransportChannelasyncSendWithReceipt in class TransportChannelSupportpacket - the packet to send
JMSExceptionpublic void setPacketListener(PacketListener listener)
TransportChannelSupport
setPacketListener in interface TransportChannelsetPacketListener in class TransportChannelSupportpublic void setExceptionListener(ExceptionListener listener)
TransportChannelSupport
setExceptionListener in interface TransportChannelsetExceptionListener in class TransportChannelSupportpublic boolean isMulticast()
isMulticast in interface TransportChannelisMulticast in class TransportChannelSupportpublic long getEstablishConnectionTimeout()
public void setEstablishConnectionTimeout(long establishConnectionTimeout)
public int getMaximumRetries()
public void setMaximumRetries(int maximumRetries)
public long getFailureSleepTime()
public void setFailureSleepTime(long failureSleepTime)
public List getUris()
public void setUris(List list)
public boolean isIncrementTimeout()
public void setIncrementTimeout(boolean incrementTimeout)
incrementTimeout - The incrementTimeout to set.public long getMaximumTimeout()
public void setMaximumTimeout(long maximumTimeout)
maximumTimeout - The maximumTimeout to set.public void setClientID(String clientID)
TransportChannel
setClientID in interface TransportChannelsetClientID in class TransportChannelSupportclientID - set the clientIDpublic boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion in interface TransportChannelcanProcessWireFormatVersion in class TransportChannelSupportversion - the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion in interface TransportChannelgetCurrentWireFormatVersion in class TransportChannelSupport
public TransportChannel getChannel()
throws JMSException
JMSException - if no channel is available
protected void establishConnection(long timeout)
throws JMSException
JMSExceptionprotected void configureChannel()
protected URI extractURI(List list)
throws JMSException
JMSException
protected void attemptToConnect(URI uri)
throws JMSException
JMSExceptionpublic void statusChanged(TransportStatusEvent event)
TransportStatusEventListener
statusChanged in interface TransportStatusEventListenerpublic boolean isTransportConnected()
isTransportConnected in interface TransportChannelisTransportConnected in class TransportChannelSupportpublic long getLastReceiptTimestamp()
TransportChannel
getLastReceiptTimestamp in interface TransportChannelgetLastReceiptTimestamp in class TransportChannelSupport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||