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.composite
Class CompositeTransportChannel

    java.lang.Object
      org.codehaus.activemq.transport.TransportChannelSupport
          org.codehaus.activemq.transport.composite.CompositeTransportChannel

All Implemented Interfaces:
  Service, TransportChannel

Direct Known Subclasses:
  ReliableTransportChannel

public class CompositeTransportChannel
extends TransportChannelSupport

A Compsite implementation of a TransportChannel

Version:
  $Revision: 1.20 $

Field Summary
`protected TransportChannel` | `channel`
`protected SynchronizedBoolean` | `closed`
`protected URI` | `currentURI`
`protected long` | `failureSleepTime`
`protected int` | `maximumRetries`
`protected SynchronizedBoolean` | `started`
`protected List` | `uris`
`protected WireFormat` | `wireFormat`

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

Constructor Summary
`CompositeTransportChannel(WireFormat wireFormat)`
`CompositeTransportChannel(WireFormat wireFormat, List uris)`

Method Summary
`void` | `asyncSend(Packet packet)` Asynchronously send a Packet
`protected void` | `attemptToConnect(URI uri)`
`boolean` | `canProcessWireFormatVersion(int version)` Can this wireformat process packets of this version
`protected void` | `configureChannel()`
`protected void` | `establishConnection(long timeout)`
`protected URI` | `extractURI(List list)`
`protected TransportChannel` | `getChannel()`
`int` | `getCurrentWireFormatVersion()`
`long` | `getEstablishConnectionTimeout()` Return the maximum amount of time spent trying to establish a connection or a negative number to keep going forever
`long` | `getFailureSleepTime()`
`int` | `getMaximumRetries()`
`List` | `getUris()`
`boolean` | `isMulticast()`
`Receipt` | `send(Packet packet)` synchronously send a Packet
`Receipt` | `send(Packet packet, int timeout)` Synchronously send a Packet
`void` | `setEstablishConnectionTimeout(long establishConnectionTimeout)`
`void` | `setExceptionListener(ExceptionListener listener)` Set an exception listener to listen for asynchronously generated exceptions
`void` | `setFailureSleepTime(long failureSleepTime)`
`void` | `setMaximumRetries(int maximumRetries)`
`void` | `setPacketListener(PacketListener listener)` Set a listener for Packets
`void` | `setUris(List list)`
`void` | `start()` start listeneing for events
`void` | `stop()` close the channel
`String` | `toString()`

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, setClientID, setPendingStop, setServerSide, setTransportChannelListener, setTransportConnected, stopExecutor`

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

Field Detail

### wireFormat

    protected WireFormat wireFormat

### uris

    protected List uris

### channel

    protected TransportChannel channel

### closed

    protected SynchronizedBoolean closed

### started

    protected SynchronizedBoolean started

### maximumRetries

    protected int maximumRetries

### failureSleepTime

    protected long failureSleepTime

### currentURI

    protected URI currentURI

Constructor Detail

### CompositeTransportChannel

    public CompositeTransportChannel(WireFormat wireFormat)

### CompositeTransportChannel

    public CompositeTransportChannel(WireFormat wireFormat,
                                     List uris)

Method Detail

### toString

    public String toString()

### start

    public void start()
               throws JMSException

  Description copied from interface: `TransportChannel`
  start listeneing for events

  Throws:
    `JMSException` - if an error occurs

### stop

    public void stop()

  close the channel

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

### send

    public Receipt send(Packet packet)
                 throws JMSException

  Description copied from class: `TransportChannelSupport`
  synchronously send a Packet

  Specified by:
    `send` in interface `TransportChannel`
  Overrides:
    `send` in class `TransportChannelSupport`
  Parameters:
    `packet` -
  Returns:
    a Receipt
  Throws:
    `JMSException`

### send

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

  Description copied from class: `TransportChannelSupport`
  Synchronously send a Packet

  Specified by:
    `send` in interface `TransportChannel`
  Overrides:
    `send` in class `TransportChannelSupport`
  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

  Description copied from interface: `TransportChannel`
  Asynchronously send a Packet

  Parameters:
    `packet` -
  Throws:
    `JMSException`

### setPacketListener

    public void setPacketListener(PacketListener listener)

  Description copied from class: `TransportChannelSupport`
  Set a listener for Packets

  Specified by:
    `setPacketListener` in interface `TransportChannel`
  Overrides:
    `setPacketListener` in class `TransportChannelSupport`
  Parameters:
    `listener` -

### setExceptionListener

    public void setExceptionListener(ExceptionListener listener)

  Description copied from class: `TransportChannelSupport`
  Set an exception listener to listen for asynchronously generated exceptions

  Specified by:
    `setExceptionListener` in interface `TransportChannel`
  Overrides:
    `setExceptionListener` in class `TransportChannelSupport`
  Parameters:
    `listener` -

### isMulticast

    public boolean isMulticast()

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

### getEstablishConnectionTimeout

    public long getEstablishConnectionTimeout()

  Return the maximum amount of time spent trying to establish a connection or a negative number to keep going forever

  Returns:

### setEstablishConnectionTimeout

    public void setEstablishConnectionTimeout(long establishConnectionTimeout)

### getMaximumRetries

    public int getMaximumRetries()

### setMaximumRetries

    public void setMaximumRetries(int maximumRetries)

### getFailureSleepTime

    public long getFailureSleepTime()

### setFailureSleepTime

    public void setFailureSleepTime(long failureSleepTime)

### getUris

    public List getUris()

### setUris

    public void setUris(List list)

### canProcessWireFormatVersion

    public boolean canProcessWireFormatVersion(int version)

  Can this wireformat process packets of this version

  Parameters:
    `version` - the version number to test
  Returns:
    true if can accept the version

### getCurrentWireFormatVersion

    public int getCurrentWireFormatVersion()

  Returns:
    the current version of this wire format

### establishConnection

    protected void establishConnection(long timeout)
                                throws JMSException

  Throws:
    `JMSException`

### getChannel

    protected TransportChannel getChannel()
                                   throws JMSException

  Throws:
    `JMSException`

### configureChannel

    protected void configureChannel()

### extractURI

    protected URI extractURI(List list)
                      throws JMSException

  Throws:
    `JMSException`

### attemptToConnect

    protected void attemptToConnect(URI uri)
                             throws JMSException

  Throws:
    `JMSException`

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.