org.activemq.transport.activeio
Class ActiveIOTransportChannel

java.lang.Object
  extended by org.activemq.transport.TransportChannelSupport
      extended by org.activemq.transport.activeio.ActiveIOTransportChannel
All Implemented Interfaces:
org.activeio.AsyncChannelListener, Service, TransportChannel

public class ActiveIOTransportChannel
extends TransportChannelSupport
implements org.activeio.AsyncChannelListener

A tcp implementation of a TransportChannel

Version:
$Revision: 1.1.1.1 $

Field Summary
 
Fields inherited from class org.activemq.transport.TransportChannelSupport
cachingEnabled, currentWireFormat, noDelay, pendingStop, transportConnected, usedInternally
 
Constructor Summary
ActiveIOTransportChannel(WireFormat wireFormat, org.activeio.AsyncChannel asynchChannel)
           
 
Method Summary
 void asyncSend(Packet packet)
          Asynchronously send a Packet
protected  Packet doAsyncSend(Packet packet)
          send a Packet to the raw underlying transport This method is here to allow specific implementations to override this method
 void forceDisconnect()
          Forces an immediate transport-level disconnect which will be asynchronously reported as an exception to the exceptionListener.
 org.activeio.AsyncChannel getAsyncChannel()
           
 int getCurrentWireFormatVersion()
           
 void onPacket(org.activeio.Packet packet)
           
 void onPacketError(IOException ex)
           
 void start()
          Called to start the service
 void stop()
          close the channel
 
Methods inherited from class org.activemq.transport.TransportChannelSupport
addTransportStatusEventListener, asyncSendWithReceipt, canProcessWireFormatVersion, doConsumePacket, doConsumePacket, doesSupportMessageCompression, doesSupportMessageFragmentation, doesSupportWireFormatVersioning, doHandleReceipt, doHandleWireFormat, fireStatusEvent, fireStatusEvent, getClientID, getEmbeddedBrokerConnector, getExceptionListener, getLastReceiptTimestamp, getPacketListener, getTransportChannelListener, getWireFormat, isCachingEnabled, isMulticast, isNoDelay, isPendingStop, isServerSide, isTransportConnected, isUsedInternally, onAsyncException, removeTransportStatusEventListener, requiresEmbeddedBroker, send, send, setCachingEnabled, setClientID, setExceptionListener, setNoDelay, setPacketListener, setPendingStop, setServerSide, setTransportChannelListener, setTransportConnected, setUsedInternally, setWireFormat, stopExecutor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveIOTransportChannel

public ActiveIOTransportChannel(WireFormat wireFormat,
                                org.activeio.AsyncChannel asynchChannel)
Method Detail

start

public void start()
           throws JMSException
Description copied from interface: Service
Called to start the service

Specified by:
start in interface Service
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 Service
Specified by:
stop in interface TransportChannel
Overrides:
stop in class TransportChannelSupport

forceDisconnect

public void forceDisconnect()
Description copied from interface: TransportChannel
Forces an immediate transport-level disconnect which will be asynchronously reported as an exception to the exceptionListener. If the channel isn't connected, the call will be ignored.

Specified by:
forceDisconnect in interface TransportChannel

asyncSend

public void asyncSend(Packet packet)
               throws JMSException
Description copied from interface: TransportChannel
Asynchronously send a Packet

Specified by:
asyncSend in interface TransportChannel
Parameters:
packet - the packet to send
Throws:
JMSException

doAsyncSend

protected Packet doAsyncSend(Packet packet)
                      throws JMSException
Description copied from class: TransportChannelSupport
send a Packet to the raw underlying transport This method is here to allow specific implementations to override this method

Overrides:
doAsyncSend in class TransportChannelSupport
Returns:
a response or null
Throws:
JMSException

onPacket

public void onPacket(org.activeio.Packet packet)
Specified by:
onPacket in interface org.activeio.AsyncChannelListener

onPacketError

public void onPacketError(IOException ex)
Specified by:
onPacketError in interface org.activeio.AsyncChannelListener

getAsyncChannel

public org.activeio.AsyncChannel getAsyncChannel()

getCurrentWireFormatVersion

public int getCurrentWireFormatVersion()
Specified by:
getCurrentWireFormatVersion in interface TransportChannel
Overrides:
getCurrentWireFormatVersion in class TransportChannelSupport
Returns:
the current version of this wire format


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