org.codehaus.activemq.transport.gnet
Class GTransportChannel

java.lang.Object
  extended byorg.codehaus.activemq.transport.TransportChannelSupport
      extended byorg.codehaus.activemq.transport.gnet.GTransportChannel
All Implemented Interfaces:
org.codehaus.activemq.service.Service, org.codehaus.activemq.transport.TransportChannel

public class GTransportChannel
extends org.codehaus.activemq.transport.TransportChannelSupport

An implementation of a TransportChannel which uses the Geronimo network layer for connectivity.

Version:
$Revision: 1.3 $

Field Summary
 
Fields inherited from class org.codehaus.activemq.transport.TransportChannelSupport
pendingStop, transportConnected
 
Constructor Summary
  GTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat, org.apache.geronimo.network.protocol.Protocol protocol, org.apache.geronimo.pool.ThreadPool tp)
           
protected GTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat, org.apache.geronimo.pool.ThreadPool tp)
          Construct basic helpers
  GTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat, URI remoteLocation, URI localLocation, org.apache.geronimo.network.SelectorManager sm, org.apache.geronimo.pool.ThreadPool tp, org.apache.geronimo.pool.ClockPool cp)
           
 
Method Summary
 void asyncSend(org.codehaus.activemq.message.Packet packet)
          Asynchronously send a Packet
 boolean canProcessWireFormatVersion(int version)
          Can this wireformat process packets of this version
 void forceDisconnect()
           
 int getCurrentWireFormatVersion()
           
 boolean isMulticast()
           
 void start()
          start listeneing for events
 void stop()
          close the channel
protected  org.codehaus.activemq.message.Packet toPacket(org.apache.geronimo.network.protocol.UpPacket packet)
           
protected  org.apache.geronimo.network.protocol.PlainDownPacket toPlainDownPacket(org.codehaus.activemq.message.Packet mqpacket)
           
 String toString()
          pretty print for object
 
Methods inherited from class org.codehaus.activemq.transport.TransportChannelSupport
addTransportStatusEventListener, asyncSendWithReceipt, doAsyncSend, doConsumePacket, doConsumePacket, doHandleReceipt, doHandleWireFormat, fireStatusEvent, fireStatusEvent, getClientID, getEmbeddedBrokerConnector, getExceptionListener, getLastReceiptTimestamp, getPacketListener, getTransportChannelListener, isPendingStop, isServerSide, isTransportConnected, onAsyncException, removeTransportStatusEventListener, requiresEmbeddedBroker, 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
 

Constructor Detail

GTransportChannel

protected GTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat,
                            org.apache.geronimo.pool.ThreadPool tp)
Construct basic helpers


GTransportChannel

public GTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat,
                         org.apache.geronimo.network.protocol.Protocol protocol,
                         org.apache.geronimo.pool.ThreadPool tp)
Parameters:
protocol -

GTransportChannel

public GTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat,
                         URI remoteLocation,
                         URI localLocation,
                         org.apache.geronimo.network.SelectorManager sm,
                         org.apache.geronimo.pool.ThreadPool tp,
                         org.apache.geronimo.pool.ClockPool cp)
                  throws UnknownHostException,
                         org.apache.geronimo.network.protocol.ProtocolException
Parameters:
remoteLocation -
localLocation -
Method Detail

stop

public void stop()
close the channel


start

public void start()
           throws JMSException
start listeneing for events

Throws:
JMSException - if an error occurs

asyncSend

public void asyncSend(org.codehaus.activemq.message.Packet packet)
               throws JMSException
Asynchronously send a Packet

Parameters:
packet -
Throws:
JMSException

isMulticast

public boolean isMulticast()

toPlainDownPacket

protected org.apache.geronimo.network.protocol.PlainDownPacket toPlainDownPacket(org.codehaus.activemq.message.Packet mqpacket)
                                                                          throws IOException,
                                                                                 JMSException
Throws:
IOException
JMSException

toPacket

protected org.codehaus.activemq.message.Packet toPacket(org.apache.geronimo.network.protocol.UpPacket packet)
                                                 throws IOException
Throws:
IOException

toString

public String toString()
pretty print for object

Returns:
String representation of this object

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

forceDisconnect

public void forceDisconnect()


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