|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.transport.AbstractTransportChannel
Some basic functionality, common across most transport implementations of channels
| Constructor Summary | |
AbstractTransportChannel()
|
|
| Method Summary | |
void |
addTransportStatusEventListener(TransportStatusEventListener listener)
Add a listener for changes in a channels status |
protected void |
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 boolean |
doHandleReceipt(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()
Returns the client ID that this channel is being used for |
ExceptionListener |
getExceptionListener()
|
PacketListener |
getPacketListener()
|
TransportChannelListener |
getTransportChannelListener()
|
protected void |
onAsyncException(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 |
Receipt |
send(Packet packet)
synchronously send a Packet |
Receipt |
send(Packet packet,
int timeout)
Synchronously send a Packet |
void |
setClientID(java.lang.String clientID)
Provides a way to specify the client ID that this channel is using |
void |
setExceptionListener(ExceptionListener listener)
Set an exception listener to listen for asynchronously generated exceptions |
void |
setPacketListener(PacketListener l)
Set a listener for Packets |
void |
setTransportChannelListener(TransportChannelListener transportChannelListener)
A listener to be notified when the channel is removed |
void |
stop()
close the channel |
protected void |
stopExecutor(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.codehaus.activemq.transport.TransportChannel |
asyncSend, isMulticast, start |
| Constructor Detail |
public AbstractTransportChannel()
| Method Detail |
public void stop()
stop in interface TransportChannel
public Receipt send(Packet packet)
throws JMSException
send in interface TransportChannelpacket -
JMSException
public Receipt send(Packet packet,
int timeout)
throws JMSException
send in interface TransportChannelpacket - packet to sendtimeout - amount of time to wait for a receipt
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()
TransportChannel
getClientID in interface TransportChannelpublic void setClientID(java.lang.String clientID)
TransportChannel
setClientID in interface TransportChannelclientID - public ExceptionListener getExceptionListener()
public PacketListener getPacketListener()
public void setPacketListener(PacketListener l)
setPacketListener in interface TransportChannell - public void setExceptionListener(ExceptionListener listener)
setExceptionListener in interface TransportChannellistener - protected void doConsumePacket(Packet packet)
packet - protected boolean doHandleReceipt(Packet packet)
protected void doAsyncSend(Packet packet)
throws JMSException
packet -
JMSExceptionprotected void onAsyncException(JMSException e)
e -
protected void fireStatusEvent(java.net.URI remoteURI,
int status)
remoteURI - status - protected void fireStatusEvent(TransportStatusEvent event)
event -
protected void stopExecutor(Executor executor)
throws java.lang.InterruptedException,
JMSException
executor - the executor or null if one is not created yet
java.lang.InterruptedException
JMSException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||