|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.transport.TransportChannelSupport
org.activemq.transport.udp.UdpTransportChannel
public class UdpTransportChannel
A UDP implementation of a TransportChannel
Field Summary | |
---|---|
protected InetAddress |
inetAddress
|
protected int |
port
|
protected DatagramSocket |
socket
|
Fields inherited from class org.activemq.transport.TransportChannelSupport |
---|
cachingEnabled, currentWireFormat, noDelay, pendingStop, transportConnected, usedInternally |
Constructor Summary | |
---|---|
protected |
UdpTransportChannel(WireFormat wireFormat)
Construct basic helpers |
|
UdpTransportChannel(WireFormat wireFormat,
DatagramSocket socket)
|
|
UdpTransportChannel(WireFormat wireFormat,
DatagramSocket socket,
int port)
|
|
UdpTransportChannel(WireFormat wireFormat,
URI remoteLocation)
|
|
UdpTransportChannel(WireFormat wireFormat,
URI remoteLocation,
int port)
|
Method Summary | |
---|---|
void |
asyncSend(Packet packet)
Asynchronously send a Packet |
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
protected void |
connect()
|
protected DatagramPacket |
createDatagramPacket()
|
protected DatagramPacket |
createDatagramPacket(Packet packet)
|
protected DatagramSocket |
createSocket(int port)
|
void |
forceDisconnect()
Forces an immediate transport-level disconnect which will be asynchronously reported as an exception to the exceptionListener. |
int |
getCurrentWireFormatVersion()
|
boolean |
isMulticast()
|
void |
run()
reads packets from a Socket |
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 DatagramSocket socket
protected int port
protected InetAddress inetAddress
Constructor Detail |
---|
protected UdpTransportChannel(WireFormat wireFormat)
public UdpTransportChannel(WireFormat wireFormat, URI remoteLocation) throws JMSException
JMSException
public UdpTransportChannel(WireFormat wireFormat, URI remoteLocation, int port) throws JMSException
JMSException
public UdpTransportChannel(WireFormat wireFormat, DatagramSocket socket) throws JMSException
socket
-
JMSException
public UdpTransportChannel(WireFormat wireFormat, DatagramSocket socket, int port) throws JMSException
JMSException
Method Detail |
---|
public void stop()
stop
in interface Service
stop
in interface TransportChannel
stop
in class TransportChannelSupport
public void forceDisconnect()
TransportChannel
forceDisconnect
in interface TransportChannel
public void start() throws JMSException
start
in interface Service
start
in interface TransportChannel
JMSException
- if an error occurspublic void asyncSend(Packet packet) throws JMSException
asyncSend
in interface TransportChannel
packet
-
JMSException
public boolean isMulticast()
isMulticast
in interface TransportChannel
isMulticast
in class TransportChannelSupport
public void run()
run
in interface Runnable
public boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion
in interface TransportChannel
canProcessWireFormatVersion
in class TransportChannelSupport
version
- the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion
in interface TransportChannel
getCurrentWireFormatVersion
in class TransportChannelSupport
protected DatagramPacket createDatagramPacket()
protected DatagramPacket createDatagramPacket(Packet packet) throws IOException, JMSException
IOException
JMSException
protected void connect() throws IOException
IOException
protected DatagramSocket createSocket(int port) throws IOException
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |