|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.transport.TransportChannelSupport
org.codehaus.activemq.transport.tcp.TcpTransportChannel
A tcp implementation of a TransportChannel
| Field Summary | |
protected Socket |
socket
|
| Fields inherited from class org.codehaus.activemq.transport.TransportChannelSupport |
pendingStop, transportConnected |
| Constructor Summary | |
protected |
TcpTransportChannel(WireFormat wireFormat)
Construct basic helpers |
|
TcpTransportChannel(WireFormat wireFormat,
Socket socket,
Executor executor)
|
|
TcpTransportChannel(WireFormat wireFormat,
URI remoteLocation)
Connect to a remote Node - e.g. |
|
TcpTransportChannel(WireFormat wireFormat,
URI remoteLocation,
URI localLocation)
Connect to a remote Node - e.g. |
| Method Summary | |
void |
asyncSend(Packet packet)
Asynchronously send a Packet |
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
protected Socket |
createSocket(URI remoteLocation)
Factory method to create a new socket |
protected Socket |
createSocket(URI remoteLocation,
URI localLocation)
Factory method to create a new socket |
protected void |
doAsyncSend(Packet packet)
Actually performs the async send of a packet |
int |
getCurrentWireFormatVersion()
|
Socket |
getSocket()
|
int |
getSoTimeout()
|
protected void |
initialiseSocket()
Configures the socket for use |
boolean |
isChangeTimeout()
|
boolean |
isMulticast()
|
boolean |
isUseAsyncSend()
|
void |
run()
reads packets from a Socket |
void |
setChangeTimeout(boolean changeTimeout)
|
void |
setSoTimeout(int soTimeout)
|
void |
setUseAsyncSend(boolean useAsyncSend)
|
void |
start()
start listeneing for events |
void |
stop()
close the channel |
String |
toString()
pretty print for object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Socket socket
| Constructor Detail |
protected TcpTransportChannel(WireFormat wireFormat)
public TcpTransportChannel(WireFormat wireFormat,
URI remoteLocation)
throws JMSException
remoteLocation -
JMSException
public TcpTransportChannel(WireFormat wireFormat,
URI remoteLocation,
URI localLocation)
throws JMSException
remoteLocation - localLocation - - e.g. local InetAddress and local port
JMSException
public TcpTransportChannel(WireFormat wireFormat,
Socket socket,
Executor executor)
throws JMSException
socket -
JMSException| Method Detail |
public void start()
throws JMSException
start in interface TransportChannelJMSException - if an error occurspublic void stop()
stop in interface TransportChannelstop in class TransportChannelSupport
public void asyncSend(Packet packet)
throws JMSException
asyncSend in interface TransportChannelpacket -
JMSExceptionpublic boolean isMulticast()
isMulticast in interface TransportChannelpublic void run()
run in interface Runnablepublic String toString()
public Socket getSocket()
public boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion in interface TransportChannelversion - the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion in interface TransportChannelpublic boolean isChangeTimeout()
public void setChangeTimeout(boolean changeTimeout)
public boolean isUseAsyncSend()
public void setUseAsyncSend(boolean useAsyncSend)
public int getSoTimeout()
public void setSoTimeout(int soTimeout)
protected void doAsyncSend(Packet packet)
throws JMSException
doAsyncSend in class TransportChannelSupportpacket -
JMSException
protected void initialiseSocket()
throws IOException
IOException
protected Socket createSocket(URI remoteLocation)
throws UnknownHostException,
IOException
remoteLocation - the URI to connect to
UnknownHostException
IOException
protected Socket createSocket(URI remoteLocation,
URI localLocation)
throws IOException,
UnknownHostException
remoteLocation - localLocation -
IOException
UnknownHostException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||