UdpTransportChannel (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.transport.udp.UdpTransportChannel class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.transport.udp
Class UdpTransportChannel

    java.lang.Object
      org.codehaus.activemq.transport.TransportChannelSupport
          org.codehaus.activemq.transport.udp.UdpTransportChannel

All Implemented Interfaces:
  Runnable, Service, TransportChannel

Direct Known Subclasses:
  MulticastTransportChannel

public class UdpTransportChannel
extends TransportChannelSupport
implements Runnable

A UDP implementation of a TransportChannel

Version:
  $Revision: 1.23 $

Field Summary
`protected InetAddress` | `inetAddress`
`protected int` | `port`
`protected DatagramSocket` | `socket`

Fields inherited from class org.codehaus.activemq.transport.TransportChannelSupport
`pendingStop, transportConnected`

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)`
`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 org.codehaus.activemq.transport.TransportChannelSupport
`addTransportStatusEventListener, doAsyncSend, doConsumePacket, doConsumePacket, doHandleReceipt, doHandleWireFormat, fireStatusEvent, fireStatusEvent, getClientID, getExceptionListener, getPacketListener, getTransportChannelListener, isPendingStop, isServerSide, isTransportConnected, onAsyncException, removeTransportStatusEventListener, send, send, setClientID, setExceptionListener, setPacketListener, setPendingStop, setServerSide, setTransportChannelListener, setTransportConnected, stopExecutor`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### socket

    protected DatagramSocket socket

### port

    protected int port

### inetAddress

    protected InetAddress inetAddress

Constructor Detail

### UdpTransportChannel

    protected UdpTransportChannel(WireFormat wireFormat)

  Construct basic helpers

### UdpTransportChannel

    public UdpTransportChannel(WireFormat wireFormat,
                               URI remoteLocation)
                        throws JMSException

### UdpTransportChannel

    public UdpTransportChannel(WireFormat wireFormat,
                               URI remoteLocation,
                               int port)
                        throws JMSException

### UdpTransportChannel

    public UdpTransportChannel(WireFormat wireFormat,
                               DatagramSocket socket)
                        throws JMSException

Parameters:
  `socket` -
Throws:
  `JMSException`

### UdpTransportChannel

    public UdpTransportChannel(WireFormat wireFormat,
                               DatagramSocket socket,
                               int port)
                        throws JMSException

Method Detail

### stop

    public void stop()

  close the channel

  Specified by:
    `stop` in interface `TransportChannel`
  Overrides:
    `stop` in class `TransportChannelSupport`

### start

    public void start()
               throws JMSException

  start listeneing for events

  Specified by:
    `start` in interface `TransportChannel`
  Throws:
    `JMSException` - if an error occurs

### asyncSend

    public void asyncSend(Packet packet)
                   throws JMSException

  Asynchronously send a Packet

  Specified by:
    `asyncSend` in interface `TransportChannel`
  Parameters:
    `packet` -
  Throws:
    `JMSException`

### isMulticast

    public boolean isMulticast()

  Specified by:
    `isMulticast` in interface `TransportChannel`
  Returns:
    true if this transport is multicast based (i.e. broadcasts to multiple nodes)

### run

    public void run()

  reads packets from a Socket

  Specified by:
    `run` in interface `Runnable`

### canProcessWireFormatVersion

    public boolean canProcessWireFormatVersion(int version)

  Can this wireformat process packets of this version

  Specified by:
    `canProcessWireFormatVersion` in interface `TransportChannel`
  Parameters:
    `version` - the version number to test
  Returns:
    true if can accept the version

### getCurrentWireFormatVersion

    public int getCurrentWireFormatVersion()

  Specified by:
    `getCurrentWireFormatVersion` in interface `TransportChannel`
  Returns:
    the current version of this wire format

### createDatagramPacket

    protected DatagramPacket createDatagramPacket()

  Returns:

### createDatagramPacket

    protected DatagramPacket createDatagramPacket(Packet packet)
                                           throws IOException,
                                                  JMSException

  Throws:
    `IOException`
    `JMSException`

### connect

    protected void connect()
                    throws IOException

  Throws:
    `IOException`

### createSocket

    protected DatagramSocket createSocket(int port)
                                   throws IOException

  Throws:
    `IOException`

### toString

    public String toString()

  pretty print for object

  Returns:
    String representation of this object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.