|
|||||||||
| Home >> All >> org >> activemq >> [ transport overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.activemq.transport
Class TransportChannelSupport

java.lang.Objectorg.activemq.transport.TransportChannelSupport
- All Implemented Interfaces:
- org.activemq.service.Service, TransportChannel
- Direct Known Subclasses:
- org.activemq.transport.composite.CompositeTransportChannel
- public abstract class TransportChannelSupport
- extends java.lang.Object
- implements TransportChannel
- extends java.lang.Object
Some basic functionality, common across most transport implementations of channels
- Version:
- $Revision: 1.1.1.1 $
| Field Summary | |
protected boolean |
cachingEnabled
|
private java.lang.String |
clientID
|
protected org.activemq.io.WireFormat |
currentWireFormat
|
private javax.jms.ExceptionListener |
exceptionListener
|
private long |
lastReceiptTimstamp
|
private CopyOnWriteArrayList |
listeners
|
private static org.apache.commons.logging.Log |
log
|
protected boolean |
noDelay
|
private org.activemq.message.PacketListener |
packetListener
|
protected boolean |
pendingStop
|
private ConcurrentHashMap |
requestMap
|
private boolean |
serverSide
|
private TransportChannelListener |
transportChannelListener
|
protected boolean |
transportConnected
|
protected boolean |
usedInternally
|
| Constructor Summary | |
protected |
TransportChannelSupport()
|
protected |
TransportChannelSupport(org.activemq.io.WireFormat wf)
|
| Method Summary | |
void |
addTransportStatusEventListener(TransportStatusEventListener listener)
Add a listener for changes in a channels status |
org.activemq.message.ReceiptHolder |
asyncSendWithReceipt(org.activemq.message.Packet packet)
Asynchronously send a Packet with receipt. |
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
protected org.activemq.message.Packet |
doAsyncSend(org.activemq.message.Packet packet)
send a Packet to the raw underlying transport This method is here to allow specific implementations to override this method |
protected void |
doConsumePacket(org.activemq.message.Packet packet)
consume a packet from the channel |
protected void |
doConsumePacket(org.activemq.message.Packet packet,
org.activemq.message.PacketListener listener)
|
boolean |
doesSupportMessageCompression()
Some transports/wireformats will not be able to understand compressed messages |
boolean |
doesSupportMessageFragmentation()
some transports/wire formats will implement their own fragementation |
boolean |
doesSupportWireFormatVersioning()
Does the transport support wire format version info |
protected boolean |
doHandleReceipt(org.activemq.message.Packet packet)
|
protected boolean |
doHandleWireFormat(org.activemq.message.Packet packet)
|
protected void |
fireStatusEvent(TransportStatusEvent event)
Fire status event to any status event listeners |
protected void |
fireStatusEvent(java.net.URI remoteURI,
int status)
Fire status event to any status event listeners |
java.lang.String |
getClientID()
|
int |
getCurrentWireFormatVersion()
|
org.activemq.broker.BrokerConnector |
getEmbeddedBrokerConnector()
Some transports that rely on an embedded broker need to create the connector used by the broker |
javax.jms.ExceptionListener |
getExceptionListener()
|
long |
getLastReceiptTimestamp()
Gets the timestamp of the last received receipt packet. |
org.activemq.message.PacketListener |
getPacketListener()
|
TransportChannelListener |
getTransportChannelListener()
|
org.activemq.io.WireFormat |
getWireFormat()
Get the current wireformat used by this channel |
boolean |
isCachingEnabled()
|
boolean |
isMulticast()
|
boolean |
isNoDelay()
Inform Transport to send messages as quickly as possible - for Tcp - this means disabling Nagles, which on OSX may provide better performance for sync sends |
boolean |
isPendingStop()
|
boolean |
isServerSide()
|
boolean |
isTransportConnected()
|
boolean |
isUsedInternally()
|
protected void |
onAsyncException(javax.jms.JMSException e)
Handles an exception thrown while performing async dispatch of messages |
void |
removeTransportStatusEventListener(TransportStatusEventListener listener)
Remove a listener for changes in a channels status |
boolean |
requiresEmbeddedBroker()
Some transports rely on an embedded broker (beer based protocols) |
org.activemq.message.Receipt |
send(org.activemq.message.Packet packet)
synchronously send a Packet |
org.activemq.message.Receipt |
send(org.activemq.message.Packet packet,
int timeout)
Synchronously send a Packet |
void |
setCachingEnabled(boolean cachingEnabled)
|
void |
setClientID(java.lang.String clientID)
Provides a way to specify the client ID that this channel is using |
void |
setExceptionListener(javax.jms.ExceptionListener listener)
Set an exception listener to listen for asynchronously generated exceptions |
void |
setNoDelay(boolean noDelay)
|
void |
setPacketListener(org.activemq.message.PacketListener l)
Set a listener for Packets |
void |
setPendingStop(boolean pendingStop)
Give the TransportChannel a hint it's about to stop |
void |
setServerSide(boolean serverSide)
set the server flag |
void |
setTransportChannelListener(TransportChannelListener transportChannelListener)
A listener to be notified when the channel is removed |
protected void |
setTransportConnected(boolean value)
|
void |
setUsedInternally(boolean usedInternally)
|
void |
setWireFormat(org.activemq.io.WireFormat wireformat)
set the wire format to be used by this channel |
void |
stop()
close the channel |
protected void |
stopExecutor(EDU.oswego.cs.dl.util.concurrent.Executor executor)
A helper method to stop the execution of an executor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.activemq.transport.TransportChannel |
asyncSend, forceDisconnect, start |
| Field Detail |
log
private static final org.apache.commons.logging.Log log
listeners
private CopyOnWriteArrayList listeners
requestMap
private ConcurrentHashMap requestMap
packetListener
private org.activemq.message.PacketListener packetListener
exceptionListener
private javax.jms.ExceptionListener exceptionListener
clientID
private java.lang.String clientID
transportChannelListener
private TransportChannelListener transportChannelListener
lastReceiptTimstamp
private long lastReceiptTimstamp
serverSide
private boolean serverSide
pendingStop
protected boolean pendingStop
transportConnected
protected boolean transportConnected
currentWireFormat
protected org.activemq.io.WireFormat currentWireFormat
cachingEnabled
protected boolean cachingEnabled
noDelay
protected boolean noDelay
usedInternally
protected boolean usedInternally
| Constructor Detail |
TransportChannelSupport
protected TransportChannelSupport()
TransportChannelSupport
protected TransportChannelSupport(org.activemq.io.WireFormat wf)
| Method Detail |
setPendingStop
public void setPendingStop(boolean pendingStop)
- Give the TransportChannel a hint it's about to stop
- Specified by:
setPendingStopin interfaceTransportChannel
isPendingStop
public boolean isPendingStop()
- Specified by:
isPendingStopin interfaceTransportChannel
setWireFormat
public void setWireFormat(org.activemq.io.WireFormat wireformat)
- set the wire format to be used by this channel
- Specified by:
setWireFormatin interfaceTransportChannel
getWireFormat
public org.activemq.io.WireFormat getWireFormat()
- Get the current wireformat used by this channel
- Specified by:
getWireFormatin interfaceTransportChannel
stop
public void stop()
- close the channel
- Specified by:
stopin interfaceTransportChannel
send
public org.activemq.message.Receipt send(org.activemq.message.Packet packet) throws javax.jms.JMSException
- synchronously send a Packet
- Specified by:
sendin interfaceTransportChannel
send
public org.activemq.message.Receipt send(org.activemq.message.Packet packet, int timeout) throws javax.jms.JMSException
- Synchronously send a Packet
- Specified by:
sendin interfaceTransportChannel
asyncSendWithReceipt
public org.activemq.message.ReceiptHolder asyncSendWithReceipt(org.activemq.message.Packet packet) throws javax.jms.JMSException
- Asynchronously send a Packet with receipt.
- Specified by:
asyncSendWithReceiptin interfaceTransportChannel
getTransportChannelListener
public TransportChannelListener getTransportChannelListener()
setTransportChannelListener
public void setTransportChannelListener(TransportChannelListener transportChannelListener)
- Description copied from interface:
TransportChannel - A listener to be notified when the channel is removed
- Specified by:
setTransportChannelListenerin interfaceTransportChannel
addTransportStatusEventListener
public void addTransportStatusEventListener(TransportStatusEventListener listener)
- Add a listener for changes in a channels status
- Specified by:
addTransportStatusEventListenerin interfaceTransportChannel
removeTransportStatusEventListener
public void removeTransportStatusEventListener(TransportStatusEventListener listener)
- Remove a listener for changes in a channels status
- Specified by:
removeTransportStatusEventListenerin interfaceTransportChannel
getClientID
public java.lang.String getClientID()
- Specified by:
getClientIDin interfaceTransportChannel
setClientID
public void setClientID(java.lang.String clientID)
- Description copied from interface:
TransportChannel - Provides a way to specify the client ID that this channel is using
- Specified by:
setClientIDin interfaceTransportChannel
getExceptionListener
public javax.jms.ExceptionListener getExceptionListener()
getPacketListener
public org.activemq.message.PacketListener getPacketListener()
setPacketListener
public void setPacketListener(org.activemq.message.PacketListener l)
- Set a listener for Packets
- Specified by:
setPacketListenerin interfaceTransportChannel
setExceptionListener
public void setExceptionListener(javax.jms.ExceptionListener listener)
- Set an exception listener to listen for asynchronously generated exceptions
- Specified by:
setExceptionListenerin interfaceTransportChannel
isServerSide
public boolean isServerSide()
- Specified by:
isServerSidein interfaceTransportChannel
setServerSide
public void setServerSide(boolean serverSide)
- Description copied from interface:
TransportChannel - set the server flag
- Specified by:
setServerSidein interfaceTransportChannel
isTransportConnected
public boolean isTransportConnected()
- Specified by:
isTransportConnectedin interfaceTransportChannel
setTransportConnected
protected void setTransportConnected(boolean value)
requiresEmbeddedBroker
public boolean requiresEmbeddedBroker()
- Some transports rely on an embedded broker (beer based protocols)
- Specified by:
requiresEmbeddedBrokerin interfaceTransportChannel
getEmbeddedBrokerConnector
public org.activemq.broker.BrokerConnector getEmbeddedBrokerConnector() throws javax.jms.JMSException
- Some transports that rely on an embedded broker need to
create the connector used by the broker
- Specified by:
getEmbeddedBrokerConnectorin interfaceTransportChannel
isMulticast
public boolean isMulticast()
- Specified by:
isMulticastin interfaceTransportChannel
canProcessWireFormatVersion
public boolean canProcessWireFormatVersion(int version)
- Can this wireformat process packets of this version
- Specified by:
canProcessWireFormatVersionin interfaceTransportChannel
getLastReceiptTimestamp
public long getLastReceiptTimestamp()
- Description copied from interface:
TransportChannel - Gets the timestamp of the last received receipt packet.
- Specified by:
getLastReceiptTimestampin interfaceTransportChannel
isUsedInternally
public boolean isUsedInternally()
- Specified by:
isUsedInternallyin interfaceTransportChannel
setUsedInternally
public void setUsedInternally(boolean usedInternally)
- Specified by:
setUsedInternallyin interfaceTransportChannel
doesSupportWireFormatVersioning
public boolean doesSupportWireFormatVersioning()
- Does the transport support wire format version info
- Specified by:
doesSupportWireFormatVersioningin interfaceTransportChannel
getCurrentWireFormatVersion
public int getCurrentWireFormatVersion()
- Specified by:
getCurrentWireFormatVersionin interfaceTransportChannel
doesSupportMessageFragmentation
public boolean doesSupportMessageFragmentation()
- some transports/wire formats will implement their own fragementation
- Specified by:
doesSupportMessageFragmentationin interfaceTransportChannel
doesSupportMessageCompression
public boolean doesSupportMessageCompression()
- Some transports/wireformats will not be able to understand compressed messages
- Specified by:
doesSupportMessageCompressionin interfaceTransportChannel
doConsumePacket
protected void doConsumePacket(org.activemq.message.Packet packet)
- consume a packet from the channel
doConsumePacket
protected void doConsumePacket(org.activemq.message.Packet packet, org.activemq.message.PacketListener listener)
doHandleReceipt
protected boolean doHandleReceipt(org.activemq.message.Packet packet)
doHandleWireFormat
protected boolean doHandleWireFormat(org.activemq.message.Packet packet)
doAsyncSend
protected org.activemq.message.Packet doAsyncSend(org.activemq.message.Packet packet) throws javax.jms.JMSException
- send a Packet to the raw underlying transport This method is here to allow specific implementations to override
this method
onAsyncException
protected void onAsyncException(javax.jms.JMSException e)
- Handles an exception thrown while performing async dispatch of messages
fireStatusEvent
protected void fireStatusEvent(java.net.URI remoteURI, int status)
- Fire status event to any status event listeners
fireStatusEvent
protected void fireStatusEvent(TransportStatusEvent event)
- Fire status event to any status event listeners
stopExecutor
protected void stopExecutor(EDU.oswego.cs.dl.util.concurrent.Executor executor) throws java.lang.InterruptedException, javax.jms.JMSException
- A helper method to stop the execution of an executor
isCachingEnabled
public boolean isCachingEnabled()
- Specified by:
isCachingEnabledin interfaceTransportChannel
setCachingEnabled
public void setCachingEnabled(boolean cachingEnabled)
- Specified by:
setCachingEnabledin interfaceTransportChannel
isNoDelay
public boolean isNoDelay()
- Inform Transport to send messages as quickly
as possible - for Tcp - this means disabling Nagles,
which on OSX may provide better performance for sync
sends
- Specified by:
isNoDelayin interfaceTransportChannel
setNoDelay
public void setNoDelay(boolean noDelay)
- Specified by:
setNoDelayin interfaceTransportChannel
|
|||||||||
| Home >> All >> org >> activemq >> [ transport overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.activemq.transport.TransportChannelSupport