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
Interface TransportChannel

All Superinterfaces:
  Service

All Known Implementing Classes:
  AbstractTransportChannel

public interface TransportChannel
extends Service

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

Version:
  $Revision: 1.9 $

Method Summary
`void` | `addTransportStatusEventListener(TransportStatusEventListener listener)` Add a listener for changes in a channels status
`void` | `asyncSend(Packet packet)` Asynchronously send a Packet
`java.lang.String` | `getClientID()` Returns the client ID that this channel is being used for
`boolean` | `isMulticast()`
`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(java.lang.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` | `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

### stop

    public void stop()

  close the channel

  Specified by:
    `stop` in interface `Service`

### start

    public void start()
               throws JMSException

  start listeneing for events

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

### send

    public Receipt send(Packet packet)
                 throws JMSException

  synchronously send a Packet

  Parameters:
    `packet` -
  Returns:
    a Receipt
  Throws:
    `JMSException`

### send

    public Receipt send(Packet packet,
                        int timeout)
                 throws JMSException

  Synchrnously send a Packet

  Parameters:
    `packet` - packet to send
    `timeout` - amount of time to wait for a receipt
  Returns:
    the Receipt
  Throws:
    `JMSException`

### asyncSend

    public void asyncSend(Packet packet)
                   throws JMSException

  Asynchronously send a Packet

  Parameters:
    `packet` -
  Throws:
    `JMSException`

### setPacketListener

    public void setPacketListener(PacketListener l)

  Set a listener for Packets

  Parameters:
    `l` -

### setExceptionListener

    public void setExceptionListener(ExceptionListener listener)

  Set an exception listener to listen for asynchronously generated exceptions

  Parameters:
    `listener` -

### isMulticast

    public boolean isMulticast()

  Returns:
    true if this transport is multicast based (i.e. broadcasts to multiple nodes)

### addTransportStatusEventListener

    public void addTransportStatusEventListener(TransportStatusEventListener listener)

  Add a listener for changes in a channels status

  Parameters:
    `listener` -

### removeTransportStatusEventListener

    public void removeTransportStatusEventListener(TransportStatusEventListener listener)

  Remove a listener for changes in a channels status

  Parameters:
    `listener` -

### setClientID

    public void setClientID(java.lang.String clientID)

  Provides a way to specify the client ID that this channel is using

  Parameters:
    `clientID` -

### getClientID

    public java.lang.String getClientID()

  Returns the client ID that this channel is being used for

### setTransportChannelListener

    public void setTransportChannelListener(TransportChannelListener listener)

  A listener to be notified when the channel is removed

  Parameters:
    `listener` -

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.