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.vm
Class VmTransportChannel

    java.lang.Object
      org.codehaus.activemq.transport.TransportChannelSupport
          org.codehaus.activemq.transport.vm.VmTransportChannel

All Implemented Interfaces:
  Runnable, Service, TransportChannel

public class VmTransportChannel
extends TransportChannelSupport
implements Runnable

A VM implementation of a TransportChannel

Version:
  $Revision: 1.22 $

Field Summary

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

Constructor Summary
`VmTransportChannel()`
`VmTransportChannel(Channel sendChannel, Channel receiveChannel)`
`VmTransportChannel(int capacity)`

Method Summary
`void` | `asyncSend(Packet packet)` Asynchronously send a Packet
`boolean` | `canProcessWireFormatVersion(int version)` Can this wireformat process packets of this version
`void` | `connect(BrokerConnector brokerConnector)` Connects the client side transport channel with the broker
`protected Channel` | `createChannel(int capacity)`
`protected PacketListener` | `createPacketListenerSender()` Creates a sender PacketListener which handles any receipts then delegates to the ultimate PacketListener (typically the JMS client)
`VmTransportChannel` | `createServerSide()` Creates the server side version of this client side channel.
`protected void` | `doClose(Exception ex)`
`int` | `getCurrentWireFormatVersion()`
`protected static int` | `getNextThreadId()`
`int` | `getReceiveCapacity()`
`Channel` | `getReceiveChannel()`
`int` | `getSendCapacity()`
`Channel` | `getSendChannel()`
`boolean` | `isAsyncSend()`
`boolean` | `isMulticast()`
`void` | `run()` reads packets from a Socket
`void` | `setAsyncSend(boolean asyncSend)`
`void` | `setPacketListener(PacketListener listener)` Set a listener for Packets
`void` | `setReceiveCapacity(int receiveCapacity)`
`void` | `setReceiveChannel(Channel receiveChannel)`
`void` | `setSendCapacity(int sendCapacity)`
`void` | `setSendChannel(Channel sendChannel)`
`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, setPendingStop, setServerSide, setTransportChannelListener, setTransportConnected, stopExecutor`

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

Constructor Detail

### VmTransportChannel

    public VmTransportChannel()

### VmTransportChannel

    public VmTransportChannel(Channel sendChannel,
                              Channel receiveChannel)

### VmTransportChannel

    public VmTransportChannel(int capacity)

Method Detail

### start

    public void start()
               throws JMSException

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

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

### stop

    public void stop()

  Description copied from class: `TransportChannelSupport`
  close the channel

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

### 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`

### toString

    public String toString()

  pretty print for object

  Returns:
    String representation of this object

### connect

    public void connect(BrokerConnector brokerConnector)
                 throws JMSException

  Connects the client side transport channel with the broker

  Throws:
    `JMSException`

### createServerSide

    public VmTransportChannel createServerSide()
                                        throws JMSException

  Creates the server side version of this client side channel. On the server side the client's side sendChannel is the receiveChannel and vice versa

  Returns:
  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` -

### 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

### getReceiveCapacity

    public int getReceiveCapacity()

### setReceiveCapacity

    public void setReceiveCapacity(int receiveCapacity)

### getSendCapacity

    public int getSendCapacity()

### setSendCapacity

    public void setSendCapacity(int sendCapacity)

### isAsyncSend

    public boolean isAsyncSend()

### setAsyncSend

    public void setAsyncSend(boolean asyncSend)

### getSendChannel

    public Channel getSendChannel()

### setSendChannel

    public void setSendChannel(Channel sendChannel)

### getReceiveChannel

    public Channel getReceiveChannel()

### setReceiveChannel

    public void setReceiveChannel(Channel receiveChannel)

### getNextThreadId

    protected static int getNextThreadId()

### createChannel

    protected Channel createChannel(int capacity)

### createPacketListenerSender

    protected PacketListener createPacketListenerSender()

  Creates a sender PacketListener which handles any receipts then delegates to the ultimate PacketListener (typically the JMS client)

  Returns:

### doClose

    protected void doClose(Exception ex)

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.