org.activemq.transport.remote
Class RemoteTransportChannel

java.lang.Object
  extended by org.activemq.transport.TransportChannelSupport
      extended by org.activemq.transport.vm.VmTransportChannel
          extended by org.activemq.transport.remote.RemoteTransportChannel
All Implemented Interfaces:
Runnable, Service, TransportChannel

public class RemoteTransportChannel
extends VmTransportChannel

A RemoteTransportChannel creates an embedded broker that creates a remote connection to another broker. This connection type is designed for reliable connections, that can use the storage mechansims of an embedded broker to be decoupled from the remote broker - i.e. for connections that need to be reliable, don't block but maybe using a transport across an unreliable network connection

An example of the expected format is: remote://tcp://remotebroker:5060

Version:
$Revision: 1.1.1.1 $

Field Summary
 
Fields inherited from class org.activemq.transport.TransportChannelSupport
cachingEnabled, currentWireFormat, noDelay, pendingStop, transportConnected, usedInternally
 
Constructor Summary
protected RemoteTransportChannel(WireFormat wireFormat, String remoteLocation)
          Construct a RemoteTransportChannel
 
Method Summary
 String getBrokerName()
           
 BrokerConnector getEmbeddedBrokerConnector()
          Some transports that rely on an embedded broker need to create the connector used by the broker
 String getRemoteLocation()
           
 String getRemotePassword()
           
 String getRemoteUserName()
           
 WireFormat getWireFormat()
          Get the current wireformat used by this channel
 boolean isTransportConnected()
           
 boolean requiresEmbeddedBroker()
          Some transports rely on an embedded broker (beer based protocols)
 void setBrokerName(String brokerName)
           
 void setClientID(String clientID)
          Provides a way to specify the client ID that this channel is using
 void setRemoteLocation(String remoteLocation)
           
 void setRemotePassword(String remotePassword)
           
 void setRemoteUserName(String remoteUserName)
           
 void setWireFormat(WireFormat wireFormat)
          set the wire format to be used by this channel
 void stop()
          close the channel
 
Methods inherited from class org.activemq.transport.vm.VmTransportChannel
asyncSend, canProcessWireFormatVersion, connect, createChannel, createPacketListenerSender, createServerSide, doClose, doesSupportMessageCompression, doesSupportMessageFragmentation, doesSupportWireFormatVersioning, forceDisconnect, getCurrentWireFormatVersion, getNextThreadId, getReceiveCapacity, getReceiveChannel, getSendCapacity, getSendChannel, getSendListener, isAsyncSend, isMulticast, run, setAsyncSend, setPacketListener, setReceiveCapacity, setReceiveChannel, setSendCapacity, setSendChannel, setSendListener, start, toString
 
Methods inherited from class org.activemq.transport.TransportChannelSupport
addTransportStatusEventListener, asyncSendWithReceipt, doAsyncSend, doConsumePacket, doConsumePacket, doHandleReceipt, doHandleWireFormat, fireStatusEvent, fireStatusEvent, getClientID, getExceptionListener, getLastReceiptTimestamp, getPacketListener, getTransportChannelListener, isCachingEnabled, isNoDelay, isPendingStop, isServerSide, isUsedInternally, onAsyncException, removeTransportStatusEventListener, send, send, setCachingEnabled, setExceptionListener, setNoDelay, setPendingStop, setServerSide, setTransportChannelListener, setTransportConnected, setUsedInternally, stopExecutor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteTransportChannel

protected RemoteTransportChannel(WireFormat wireFormat,
                                 String remoteLocation)
                          throws JMSException
Construct a RemoteTransportChannel

Parameters:
wireFormat -
peerURIs -
Throws:
JMSException
Method Detail

isTransportConnected

public boolean isTransportConnected()
Specified by:
isTransportConnected in interface TransportChannel
Overrides:
isTransportConnected in class TransportChannelSupport
Returns:
true if the transport channel is active, this value will be false through reconnecting

requiresEmbeddedBroker

public boolean requiresEmbeddedBroker()
Some transports rely on an embedded broker (beer based protocols)

Specified by:
requiresEmbeddedBroker in interface TransportChannel
Overrides:
requiresEmbeddedBroker in class TransportChannelSupport
Returns:
true if an embedded broker required

setClientID

public void setClientID(String clientID)
Provides a way to specify the client ID that this channel is using

Specified by:
setClientID in interface TransportChannel
Overrides:
setClientID in class TransportChannelSupport
Parameters:
clientID -

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 VmTransportChannel

getEmbeddedBrokerConnector

public BrokerConnector getEmbeddedBrokerConnector()
                                           throws JMSException
Some transports that rely on an embedded broker need to create the connector used by the broker

Specified by:
getEmbeddedBrokerConnector in interface TransportChannel
Overrides:
getEmbeddedBrokerConnector in class TransportChannelSupport
Returns:
the BrokerConnector or null if not applicable
Throws:
JMSException

getRemoteLocation

public String getRemoteLocation()
Returns:
Returns the remoteLocation.

setRemoteLocation

public void setRemoteLocation(String remoteLocation)
Parameters:
remoteLocation - The remoteLocation to set.

getRemotePassword

public String getRemotePassword()
Returns:
Returns the remotePassword.

setRemotePassword

public void setRemotePassword(String remotePassword)
Parameters:
remotePassword - The remotePassword to set.

getRemoteUserName

public String getRemoteUserName()
Returns:
Returns the remoteUserName.

setRemoteUserName

public void setRemoteUserName(String remoteUserName)
Parameters:
remoteUserName - The remoteUserName to set.

getWireFormat

public WireFormat getWireFormat()
Description copied from class: TransportChannelSupport
Get the current wireformat used by this channel

Specified by:
getWireFormat in interface TransportChannel
Overrides:
getWireFormat in class TransportChannelSupport
Returns:
Returns the wireFormat.

setWireFormat

public void setWireFormat(WireFormat wireFormat)
Description copied from class: TransportChannelSupport
set the wire format to be used by this channel

Specified by:
setWireFormat in interface TransportChannel
Overrides:
setWireFormat in class TransportChannelSupport
Parameters:
wireFormat - The wireFormat to set.

getBrokerName

public String getBrokerName()
Returns:
Returns the brokerName.

setBrokerName

public void setBrokerName(String brokerName)
Parameters:
brokerName - The brokerName to set.


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