|
|||||||||||
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
A Compsite implementation of a TransportChannel
Field Summary | |
protected TransportChannel |
channel
|
protected EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean |
closed
|
protected java.net.URI |
currentURI
|
protected long |
establishConnectionTimeout
|
protected long |
failureSleepTime
|
protected boolean |
incrementTimeout
|
protected int |
maximumRetries
|
protected long |
maximumTimeout
|
protected EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean |
started
|
protected java.util.List |
uris
|
Fields inherited from class org.activemq.transport.TransportChannelSupport |
cachingEnabled, currentWireFormat, noDelay, pendingStop, transportConnected, usedInternally |
Constructor Summary | |
CompositeTransportChannel(WireFormat wireFormat)
|
|
CompositeTransportChannel(WireFormat wireFormat,
java.util.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(java.net.URI uri)
|
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
protected void |
configureChannel()
|
protected void |
establishConnection(long timeout)
|
protected java.net.URI |
extractURI(java.util.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()
|
java.util.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 |
setEstablishConnectionTimeout(long establishConnectionTimeout)
|
void |
setExceptionListener(javax.jms.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(java.util.List list)
|
void |
start()
start listeneing for events |
void |
statusChanged(TransportStatusEvent event)
called when the status of a transport channel changes |
void |
stop()
close the channel |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.List uris
protected java.net.URI currentURI
protected TransportChannel channel
protected EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean closed
protected EDU.oswego.cs.dl.util.concurrent.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, java.util.List uris)
Method Detail |
public java.lang.String toString()
public void start() throws javax.jms.JMSException
TransportChannel
start
in interface TransportChannel
javax.jms.JMSException
- if an error occurspublic void stop()
stop
in interface TransportChannel
stop
in class TransportChannelSupport
public void forceDisconnect()
forceDisconnect
in interface TransportChannel
public Receipt send(Packet packet) throws javax.jms.JMSException
TransportChannelSupport
send
in interface TransportChannel
send
in class TransportChannelSupport
packet
-
javax.jms.JMSException
public Receipt send(Packet packet, int timeout) throws javax.jms.JMSException
TransportChannelSupport
send
in interface TransportChannel
send
in class TransportChannelSupport
packet
- packet to sendtimeout
- amount of time to wait for a receipt
javax.jms.JMSException
public void asyncSend(Packet packet) throws javax.jms.JMSException
TransportChannel
asyncSend
in interface TransportChannel
packet
- the packet to send
javax.jms.JMSException
public ReceiptHolder asyncSendWithReceipt(Packet packet) throws javax.jms.JMSException
TransportChannelSupport
asyncSendWithReceipt
in interface TransportChannel
asyncSendWithReceipt
in class TransportChannelSupport
packet
- the packet to send
javax.jms.JMSException
public void setPacketListener(PacketListener listener)
TransportChannelSupport
setPacketListener
in interface TransportChannel
setPacketListener
in class TransportChannelSupport
listener
- public void setExceptionListener(javax.jms.ExceptionListener listener)
TransportChannelSupport
setExceptionListener
in interface TransportChannel
setExceptionListener
in class TransportChannelSupport
listener
- public boolean isMulticast()
isMulticast
in interface TransportChannel
isMulticast
in class TransportChannelSupport
public long getEstablishConnectionTimeout()
public void setEstablishConnectionTimeout(long establishConnectionTimeout)
public int getMaximumRetries()
public void setMaximumRetries(int maximumRetries)
public long getFailureSleepTime()
public void setFailureSleepTime(long failureSleepTime)
public java.util.List getUris()
public void setUris(java.util.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 boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion
in interface TransportChannel
canProcessWireFormatVersion
in class TransportChannelSupport
version
- the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion
in interface TransportChannel
getCurrentWireFormatVersion
in class TransportChannelSupport
public TransportChannel getChannel() throws javax.jms.JMSException
javax.jms.JMSException
- if no channel is availableprotected void establishConnection(long timeout) throws javax.jms.JMSException
javax.jms.JMSException
protected void configureChannel()
protected java.net.URI extractURI(java.util.List list) throws javax.jms.JMSException
javax.jms.JMSException
protected void attemptToConnect(java.net.URI uri) throws javax.jms.JMSException
javax.jms.JMSException
public void statusChanged(TransportStatusEvent event)
TransportStatusEventListener
statusChanged
in interface TransportStatusEventListener
event
- public boolean isTransportConnected()
isTransportConnected
in interface TransportChannel
isTransportConnected
in class TransportChannelSupport
public long getLastReceiptTimestamp()
TransportChannel
getLastReceiptTimestamp
in interface TransportChannel
getLastReceiptTimestamp
in class TransportChannelSupport
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |