java.lang.Object
org.activemq.transport.TransportChannelSupport
org.activemq.transport.udp.UdpTransportChannel
- All Implemented Interfaces:
- java.lang.Runnable, org.activemq.service.Service, org.activemq.transport.TransportChannel
- public class UdpTransportChannel
- extends org.activemq.transport.TransportChannelSupport
- implements java.lang.Runnable
A UDP implementation of a TransportChannel
- Version:
- $Revision: 1.1.1.1 $
| Methods inherited from class org.activemq.transport.TransportChannelSupport |
addTransportStatusEventListener, asyncSendWithReceipt, doAsyncSend, doConsumePacket, doConsumePacket, doesSupportMessageCompression, doesSupportMessageFragmentation, doesSupportWireFormatVersioning, doHandleReceipt, doHandleWireFormat, fireStatusEvent, fireStatusEvent, getClientID, getEmbeddedBrokerConnector, getExceptionListener, getLastReceiptTimestamp, getPacketListener, getTransportChannelListener, getWireFormat, isCachingEnabled, isNoDelay, isPendingStop, isServerSide, isTransportConnected, isUsedInternally, onAsyncException, removeTransportStatusEventListener, requiresEmbeddedBroker, send, send, setCachingEnabled, setClientID, setExceptionListener, setNoDelay, setPacketListener, setPendingStop, setServerSide, setTransportChannelListener, setTransportConnected, setUsedInternally, setWireFormat, stopExecutor |
SOCKET_BUFFER_SIZE
private static final int SOCKET_BUFFER_SIZE
- See Also:
- Constant Field Values
SO_TIMEOUT
private static final int SO_TIMEOUT
- See Also:
- Constant Field Values
log
private static final org.apache.commons.logging.Log log
socket
protected java.net.DatagramSocket socket
port
protected int port
inetAddress
protected java.net.InetAddress inetAddress
wireFormat
private org.activemq.io.WireFormat wireFormat
closed
private SynchronizedBoolean closed
started
private SynchronizedBoolean started
thread
private java.lang.Thread thread
UdpTransportChannel
protected UdpTransportChannel(org.activemq.io.WireFormat wireFormat)
- Construct basic helpers
UdpTransportChannel
public UdpTransportChannel(org.activemq.io.WireFormat wireFormat,
java.net.URI remoteLocation)
throws javax.jms.JMSException
UdpTransportChannel
public UdpTransportChannel(org.activemq.io.WireFormat wireFormat,
java.net.URI remoteLocation,
int port)
throws javax.jms.JMSException
UdpTransportChannel
public UdpTransportChannel(org.activemq.io.WireFormat wireFormat,
java.net.DatagramSocket socket)
throws javax.jms.JMSException
UdpTransportChannel
public UdpTransportChannel(org.activemq.io.WireFormat wireFormat,
java.net.DatagramSocket socket,
int port)
throws javax.jms.JMSException
stop
public void stop()
- close the channel
- Specified by:
stop in interface org.activemq.transport.TransportChannel
forceDisconnect
public void forceDisconnect()
- Description copied from interface:
org.activemq.transport.TransportChannel
- Forces an immediate transport-level disconnect which will be asynchronously reported
as an exception to the exceptionListener. If the channel isn't connected, the call will
be ignored.
- Specified by:
forceDisconnect in interface org.activemq.transport.TransportChannel
start
public void start()
throws javax.jms.JMSException
- start listeneing for events
- Specified by:
start in interface org.activemq.transport.TransportChannel
asyncSend
public void asyncSend(org.activemq.message.Packet packet)
throws javax.jms.JMSException
- Asynchronously send a Packet
- Specified by:
asyncSend in interface org.activemq.transport.TransportChannel
isMulticast
public boolean isMulticast()
- Specified by:
isMulticast in interface org.activemq.transport.TransportChannel
run
public void run()
- reads packets from a Socket
- Specified by:
run in interface java.lang.Runnable
canProcessWireFormatVersion
public boolean canProcessWireFormatVersion(int version)
- Can this wireformat process packets of this version
- Specified by:
canProcessWireFormatVersion in interface org.activemq.transport.TransportChannel
getCurrentWireFormatVersion
public int getCurrentWireFormatVersion()
- Specified by:
getCurrentWireFormatVersion in interface org.activemq.transport.TransportChannel
createDatagramPacket
protected java.net.DatagramPacket createDatagramPacket()
createDatagramPacket
protected java.net.DatagramPacket createDatagramPacket(org.activemq.message.Packet packet)
throws java.io.IOException,
javax.jms.JMSException
doClose
private void doClose(java.lang.Exception ex)
connect
protected void connect()
throws java.io.IOException
createSocket
protected java.net.DatagramSocket createSocket(int port)
throws java.io.IOException
toString
public java.lang.String toString()
- pretty print for object