org.codehaus.activemq.transport.ember
Class EmberTransportChannel

java.lang.Object
  extended byorg.codehaus.activemq.transport.TransportChannelSupport
      extended byorg.codehaus.activemq.transport.ember.EmberTransportChannel
All Implemented Interfaces:
pyrasun.eio.services.bytearray.ByteArrayServerClientListener, org.codehaus.activemq.service.Service, org.codehaus.activemq.transport.TransportChannel

public class EmberTransportChannel
extends org.codehaus.activemq.transport.TransportChannelSupport
implements pyrasun.eio.services.bytearray.ByteArrayServerClientListener

An EmberIO (using NIO) implementation of a TransportChannel

Version:
$Revision: 1.3 $

Field Summary
 
Fields inherited from class org.codehaus.activemq.transport.TransportChannelSupport
pendingStop, transportConnected
 
Constructor Summary
protected EmberTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat)
          Construct basic helpers
  EmberTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat, pyrasun.eio.EIOGlobalContext context, pyrasun.eio.services.EmberServiceController controller, pyrasun.eio.services.bytearray.ByteArrayServerClient client)
          Connect to a remote Node - e.g.
 
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
protected  JMSException createJMSException(String message, Exception ex)
          Factory method to create a JMSException which is linked to the base exception
 void forceDisconnect()
           
 int getCurrentWireFormatVersion()
           
 boolean isMulticast()
           
 void newMessage(pyrasun.eio.services.bytearray.ByteArrayServerClient client, Object msg)
           
 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, 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

EmberTransportChannel

protected EmberTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat)
Construct basic helpers


EmberTransportChannel

public EmberTransportChannel(org.codehaus.activemq.io.WireFormat wireFormat,
                             pyrasun.eio.EIOGlobalContext context,
                             pyrasun.eio.services.EmberServiceController controller,
                             pyrasun.eio.services.bytearray.ByteArrayServerClient client)
Connect to a remote Node - e.g. a Broker

Method Detail

stop

public void stop()
close the channel

Specified by:
stop in interface org.codehaus.activemq.transport.TransportChannel

forceDisconnect

public void forceDisconnect()
Specified by:
forceDisconnect in interface org.codehaus.activemq.transport.TransportChannel

start

public void start()
           throws JMSException
start listeneing for events

Specified by:
start in interface org.codehaus.activemq.transport.TransportChannel
Throws:
JMSException - if an error occurs

asyncSend

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

Specified by:
asyncSend in interface org.codehaus.activemq.transport.TransportChannel
Parameters:
packet -
Throws:
JMSException

isMulticast

public boolean isMulticast()
Specified by:
isMulticast in interface org.codehaus.activemq.transport.TransportChannel

createJMSException

protected JMSException createJMSException(String message,
                                          Exception ex)
Factory method to create a JMSException which is linked to the base exception


toString

public String toString()
pretty print for object

Returns:
String representation of this object

newMessage

public void newMessage(pyrasun.eio.services.bytearray.ByteArrayServerClient client,
                       Object msg)
Specified by:
newMessage in interface pyrasun.eio.services.bytearray.ByteArrayServerClientListener

canProcessWireFormatVersion

public boolean canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version

Specified by:
canProcessWireFormatVersion in interface org.codehaus.activemq.transport.TransportChannel
Parameters:
version - the version number to test
Returns:
true if can accept the version

getCurrentWireFormatVersion

public int getCurrentWireFormatVersion()
Specified by:
getCurrentWireFormatVersion in interface org.codehaus.activemq.transport.TransportChannel
Returns:
the current version of this wire format


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