org.codehaus.activemq.transport
Class NetworkChannel

java.lang.Object
  extended byorg.codehaus.activemq.transport.NetworkChannel
All Implemented Interfaces:
ConsumerInfoListener, Service

public class NetworkChannel
extends Object
implements Service, ConsumerInfoListener

Represents a broker's connection with a single remote broker which bridges the two brokers to form a network.

The NetworkChannel contains a JMS connection with the remote broker.

New subscriptions on the local broker are multiplexed into the JMS connection so that messages published on the remote broker can be replayed onto the local broker.

Version:
$Revision: 1.18 $

Constructor Summary
NetworkChannel()
          Default Constructor
NetworkChannel(BrokerContainer brokerContainer, String uri)
          Constructor
 
Method Summary
 BrokerContainer getBrokerContainer()
           
 int getMaximumRetries()
           
 long getReconnectSleepTime()
           
 String getRemoteBrokerName()
           
 String getRemotePassword()
           
 String getRemoteUserName()
           
 String getUri()
           
 void onConsumerInfo(BrokerClient client, ConsumerInfo info)
          Listen for new Consumer events at this broker
 void setBrokerContainer(BrokerContainer brokerContainer)
           
 void setMaximumRetries(int maximumRetries)
           
 void setReconnectSleepTime(long reconnectSleepTime)
           
 void setRemoteBrokerName(String remoteBrokerName)
           
 void setRemotePassword(String remotePassword)
           
 void setRemoteUserName(String remoteUserName)
           
 void setUri(String uri)
          set the uri of the broker(s) this channel is connected to
 void start()
          Start the channel
 void stop()
          stop the channel
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetworkChannel

public NetworkChannel()
Default Constructor


NetworkChannel

public NetworkChannel(BrokerContainer brokerContainer,
                      String uri)
Constructor

Parameters:
brokerContainer -
uri -
Method Detail

toString

public String toString()
Returns:
text info on this

start

public void start()
           throws JMSException
Start the channel

Specified by:
start in interface Service
Throws:
JMSException

stop

public void stop()
          throws JMSException
stop the channel

Specified by:
stop in interface Service
Throws:
JMSException - on error

onConsumerInfo

public void onConsumerInfo(BrokerClient client,
                           ConsumerInfo info)
Listen for new Consumer events at this broker

Specified by:
onConsumerInfo in interface ConsumerInfoListener
Parameters:
client -
info -

getUri

public String getUri()
Returns:
the uri of the broker(s) this channel is connected to

setUri

public void setUri(String uri)
set the uri of the broker(s) this channel is connected to

Parameters:
uri -

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.

getBrokerContainer

public BrokerContainer getBrokerContainer()
Returns:
Returns the brokerContainer.

setBrokerContainer

public void setBrokerContainer(BrokerContainer brokerContainer)
Parameters:
brokerContainer - The brokerContainer to set.

getMaximumRetries

public int getMaximumRetries()

setMaximumRetries

public void setMaximumRetries(int maximumRetries)

getReconnectSleepTime

public long getReconnectSleepTime()

setReconnectSleepTime

public void setReconnectSleepTime(long reconnectSleepTime)

getRemoteBrokerName

public String getRemoteBrokerName()

setRemoteBrokerName

public void setRemoteBrokerName(String remoteBrokerName)


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