org.codehaus.activemq.transport.vm
Class VmTransportChannel

java.lang.Object
  extended byorg.codehaus.activemq.transport.AbstractTransportChannel
      extended byorg.codehaus.activemq.transport.vm.VmTransportChannel
All Implemented Interfaces:
java.lang.Runnable, Service, TransportChannel

public class VmTransportChannel
extends AbstractTransportChannel
implements java.lang.Runnable

A VM implementation of a TransportChannel

Version:
$Revision: 1.17 $

Constructor Summary
VmTransportChannel()
           
VmTransportChannel(Channel sendChannel, Channel receiveChannel)
           
VmTransportChannel(int capacity)
           
 
Method Summary
 void asyncSend(Packet packet)
          Asynchronously send a Packet
 TransportChannel createServerSide()
          Creates the server side version of this client side channel.
static int getNextThreadId()
           
 boolean isMulticast()
           
 void run()
          reads packets from a Socket
 void start()
          start listeneing for events
 void stop()
          close the channel
 java.lang.String toString()
          pretty print for object
 
Methods inherited from class org.codehaus.activemq.transport.AbstractTransportChannel
addTransportStatusEventListener, doAsyncSend, doConsumePacket, doHandleReceipt, fireStatusEvent, fireStatusEvent, getClientID, getExceptionListener, getPacketListener, getTransportChannelListener, onAsyncException, removeTransportStatusEventListener, send, send, setClientID, setExceptionListener, setPacketListener, setTransportChannelListener, stopExecutor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VmTransportChannel

public VmTransportChannel(Channel sendChannel,
                          Channel receiveChannel)

VmTransportChannel

public VmTransportChannel()

VmTransportChannel

public VmTransportChannel(int capacity)
Method Detail

stop

public void stop()
close the channel

Specified by:
stop in interface TransportChannel
Overrides:
stop in class AbstractTransportChannel

start

public void start()
           throws JMSException
start listeneing for events

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

getNextThreadId

public static int getNextThreadId()

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 java.lang.Runnable

toString

public java.lang.String toString()
pretty print for object

Returns:
String representation of this object

createServerSide

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


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