|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activemq.transport.TransportChannelSupport
Some basic functionality, common across most transport implementations of channels
| Field Summary | |
protected boolean |
cachingEnabled
|
protected WireFormat |
currentWireFormat
|
protected boolean |
noDelay
|
protected boolean |
pendingStop
|
protected boolean |
transportConnected
|
protected boolean |
usedInternally
|
| Constructor Summary | |
protected |
TransportChannelSupport()
|
protected |
TransportChannelSupport(WireFormat wf)
|
| Method Summary | |
void |
addTransportStatusEventListener(TransportStatusEventListener listener)
Add a listener for changes in a channels status |
ReceiptHolder |
asyncSendWithReceipt(Packet packet)
Asynchronously send a Packet with receipt. |
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
protected Packet |
doAsyncSend(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(Packet packet)
consume a packet from the channel |
protected void |
doConsumePacket(Packet packet,
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(Packet packet)
|
protected boolean |
doHandleWireFormat(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()
|
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. |
PacketListener |
getPacketListener()
|
TransportChannelListener |
getTransportChannelListener()
|
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) |
Receipt |
send(Packet packet)
synchronously send a Packet |
Receipt |
send(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(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(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 |
protected boolean pendingStop
protected boolean transportConnected
protected WireFormat currentWireFormat
protected boolean cachingEnabled
protected boolean noDelay
protected boolean usedInternally
| Constructor Detail |
protected TransportChannelSupport()
protected TransportChannelSupport(WireFormat wf)
| Method Detail |
public void setPendingStop(boolean pendingStop)
setPendingStop in interface TransportChannelpendingStop - public boolean isPendingStop()
isPendingStop in interface TransportChannelpublic void setWireFormat(WireFormat wireformat)
setWireFormat in interface TransportChannelwireformat - public WireFormat getWireFormat()
getWireFormat in interface TransportChannelpublic void stop()
stop in interface TransportChannel
public Receipt send(Packet packet)
throws javax.jms.JMSException
send in interface TransportChannelpacket -
javax.jms.JMSException
public Receipt send(Packet packet,
int timeout)
throws javax.jms.JMSException
send in interface TransportChannelpacket - packet to sendtimeout - amount of time to wait for a receipt
javax.jms.JMSException
public ReceiptHolder asyncSendWithReceipt(Packet packet)
throws javax.jms.JMSException
asyncSendWithReceipt in interface TransportChannelpacket - the packet to send
javax.jms.JMSExceptionpublic TransportChannelListener getTransportChannelListener()
public void setTransportChannelListener(TransportChannelListener transportChannelListener)
TransportChannel
setTransportChannelListener in interface TransportChanneltransportChannelListener - public void addTransportStatusEventListener(TransportStatusEventListener listener)
addTransportStatusEventListener in interface TransportChannellistener - public void removeTransportStatusEventListener(TransportStatusEventListener listener)
removeTransportStatusEventListener in interface TransportChannellistener - public java.lang.String getClientID()
getClientID in interface TransportChannelpublic void setClientID(java.lang.String clientID)
TransportChannel
setClientID in interface TransportChannelclientID - set the clientIDpublic javax.jms.ExceptionListener getExceptionListener()
public PacketListener getPacketListener()
public void setPacketListener(PacketListener l)
setPacketListener in interface TransportChannell - public void setExceptionListener(javax.jms.ExceptionListener listener)
setExceptionListener in interface TransportChannellistener - public boolean isServerSide()
isServerSide in interface TransportChannelpublic void setServerSide(boolean serverSide)
TransportChannel
setServerSide in interface TransportChannelserverSide - public boolean isTransportConnected()
isTransportConnected in interface TransportChannelprotected void setTransportConnected(boolean value)
public boolean requiresEmbeddedBroker()
requiresEmbeddedBroker in interface TransportChannel
public BrokerConnector getEmbeddedBrokerConnector()
throws javax.jms.JMSException
getEmbeddedBrokerConnector in interface TransportChanneljavax.jms.JMSExceptionpublic boolean isMulticast()
isMulticast in interface TransportChannelpublic boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion in interface TransportChannelversion - the version number to test
public long getLastReceiptTimestamp()
TransportChannel
getLastReceiptTimestamp in interface TransportChannelpublic boolean isUsedInternally()
isUsedInternally in interface TransportChannelpublic void setUsedInternally(boolean usedInternally)
setUsedInternally in interface TransportChannelusedInternally - The usedInternally to set.public boolean doesSupportWireFormatVersioning()
doesSupportWireFormatVersioning in interface TransportChannelpublic int getCurrentWireFormatVersion()
getCurrentWireFormatVersion in interface TransportChannelpublic boolean doesSupportMessageFragmentation()
doesSupportMessageFragmentation in interface TransportChannelpublic boolean doesSupportMessageCompression()
doesSupportMessageCompression in interface TransportChannelprotected void doConsumePacket(Packet packet)
packet -
UnsupportedWireFormatException
protected void doConsumePacket(Packet packet,
PacketListener listener)
protected boolean doHandleReceipt(Packet packet)
protected boolean doHandleWireFormat(Packet packet)
protected Packet doAsyncSend(Packet packet)
throws javax.jms.JMSException
packet -
javax.jms.JMSExceptionprotected void onAsyncException(javax.jms.JMSException e)
e -
protected void fireStatusEvent(java.net.URI remoteURI,
int status)
remoteURI - status - protected void fireStatusEvent(TransportStatusEvent event)
event -
protected void stopExecutor(EDU.oswego.cs.dl.util.concurrent.Executor executor)
throws java.lang.InterruptedException,
javax.jms.JMSException
executor - the executor or null if one is not created yet
java.lang.InterruptedException
javax.jms.JMSExceptionpublic boolean isCachingEnabled()
isCachingEnabled in interface TransportChannelpublic void setCachingEnabled(boolean cachingEnabled)
setCachingEnabled in interface TransportChannelcachingEnabled - The cachingEnabled to set.public boolean isNoDelay()
isNoDelay in interface TransportChannelpublic void setNoDelay(boolean noDelay)
setNoDelay in interface TransportChannelnoDelay - The noDelay to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||