org.activemq.transport.jrms
Class JRMSTransportChannel

java.lang.Object
  extended by org.activemq.transport.TransportChannelSupport
      extended by org.activemq.transport.jrms.JRMSTransportChannel
All Implemented Interfaces:
Runnable, org.activemq.service.Service, org.activemq.transport.TransportChannel

public class JRMSTransportChannel
extends org.activemq.transport.TransportChannelSupport
implements Runnable

A JRMS implementation of a TransportChannel

Version:
$Revision$

Field Summary
 
Fields inherited from class org.activemq.transport.TransportChannelSupport
cachingEnabled, currentWireFormat, noDelay, pendingStop, transportConnected, usedInternally
 
Constructor Summary
protected JRMSTransportChannel(org.activemq.io.WireFormat wireFormat)
          Construct basic helpers
  JRMSTransportChannel(org.activemq.io.WireFormat wireFormat, URI remoteLocation)
          Connect to a remote Node - e.g.
 
Method Summary
 void asyncSend(org.activemq.message.Packet packet)
          Asynchronously send a Packet
 boolean canProcessWireFormatVersion(int version)
          Can this wireformat process packets of this version
protected  DatagramPacket createDatagramPacket()
           
protected  DatagramPacket createDatagramPacket(org.activemq.message.Packet packet)
           
 void forceDisconnect()
           
 int getCurrentWireFormatVersion()
           
 boolean isMulticast()
           
 void run()
          reads packets from a Socket
 void start()
          start listeneing for events
 void stop()
          close the channel
 String toString()
          pretty print for object
 
Methods inherited from class org.activemq.transport.TransportChannelSupport
addTransportStatusEventListener, asyncSendWithReceipt, doAsyncSend, doConsumePacket, doConsumePacket, doesSupportMessageCompression, doesSupportMessageFragmentation, doesSupportWireFormatVersioning, doHandleReceipt, doHandleWireFormat, fireStatusEvent, fireStatusEvent, getClientID, getEmbeddedBrokerConnector, getExceptionListener, getLastReceiptTimestamp, getPacketListener, getTransportChannelListener, getWireFormat, isCachingEnabled, 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, wait, wait, wait
 

Constructor Detail

JRMSTransportChannel

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


JRMSTransportChannel

public JRMSTransportChannel(org.activemq.io.WireFormat wireFormat,
                            URI remoteLocation)
                     throws JMSException
Connect to a remote Node - e.g. a Broker

Parameters:
remoteLocation -
Throws:
JMSException
Method Detail

stop

public void stop()
close the channel

Specified by:
stop in interface org.activemq.service.Service
Specified by:
stop in interface org.activemq.transport.TransportChannel
Overrides:
stop in class org.activemq.transport.TransportChannelSupport

start

public void start()
           throws JMSException
start listeneing for events

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

asyncSend

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

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

isMulticast

public boolean isMulticast()
Specified by:
isMulticast in interface org.activemq.transport.TransportChannel
Overrides:
isMulticast in class org.activemq.transport.TransportChannelSupport

run

public void run()
reads packets from a Socket

Specified by:
run in interface Runnable

canProcessWireFormatVersion

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

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

getCurrentWireFormatVersion

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

createDatagramPacket

protected DatagramPacket createDatagramPacket()

createDatagramPacket

protected DatagramPacket createDatagramPacket(org.activemq.message.Packet packet)
                                       throws IOException,
                                              JMSException
Throws:
IOException
JMSException

toString

public String toString()
pretty print for object

Overrides:
toString in class Object
Returns:
String representation of this object

forceDisconnect

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


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