|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A TransportChannel is used for tranporting packets between nodes e.g. a ActiveMQ JMS Connection and Broker. The TransportChannel supports synchronous and asynchronous send operations as well as sync or async reading of packets. A TransportChannel implementation could use a dedicated thread using blocking IO to read from a socket or could use NIO or poll some file system or database etc. On receipt of a Packet the TransportChannel should invoke the PacketListener
| Method Summary | |
void |
addTransportStatusEventListener(TransportStatusEventListener listener)
Add a listener for changes in a channels status |
void |
asyncSend(Packet packet)
Asynchronously send a Packet |
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
String |
getClientID()
|
int |
getCurrentWireFormatVersion()
|
boolean |
isMulticast()
|
boolean |
isPendingStop()
|
boolean |
isServerSide()
|
boolean |
isTransportConnected()
|
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)
Synchrnously send a Packet |
void |
setClientID(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 |
setPendingStop(boolean pendingStop)
Give the TransportChannel a hint it's about to stop |
void |
setServerSide(boolean serverSide)
set the server flag |
void |
setTransportChannelListener(TransportChannelListener listener)
A listener to be notified when the channel is removed |
void |
start()
start listeneing for events |
void |
stop()
close the channel |
| Method Detail |
public void setPendingStop(boolean pendingStop)
pendingStop - public boolean isPendingStop()
public void stop()
stop in interface Service
public void start()
throws JMSException
start in interface ServiceJMSException - if an error occurs
public Receipt send(Packet packet)
throws JMSException
packet -
JMSException
public Receipt send(Packet packet,
int timeout)
throws JMSException
packet - packet to sendtimeout - amount of time to wait for a receipt
JMSException
public void asyncSend(Packet packet)
throws JMSException
packet -
JMSExceptionpublic void setPacketListener(PacketListener l)
l - public void setExceptionListener(ExceptionListener listener)
listener - public boolean isMulticast()
public void addTransportStatusEventListener(TransportStatusEventListener listener)
listener - public void removeTransportStatusEventListener(TransportStatusEventListener listener)
listener - public void setClientID(String clientID)
clientID - public String getClientID()
public void setTransportChannelListener(TransportChannelListener listener)
listener - public boolean isServerSide()
public void setServerSide(boolean serverSide)
serverSide - public boolean canProcessWireFormatVersion(int version)
version - the version number to test
public int getCurrentWireFormatVersion()
public boolean isTransportConnected()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||