|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.transport.NetworkChannel
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.
Field Summary | |
protected BrokerContainer |
brokerContainer
|
protected ConcurrentHashMap |
consumerMap
|
protected ActiveMQConnection |
localConnection
|
protected int |
maximumRetries
|
protected long |
reconnectSleepTime
|
protected String |
remoteBrokerName
|
protected String |
remoteClusterName
|
protected ActiveMQConnection |
remoteConnection
|
protected String |
remotePassword
|
protected String |
remoteUserName
|
protected PooledExecutor |
threadPool
|
protected String |
uri
|
Constructor Summary | |
NetworkChannel()
Default constructor |
|
NetworkChannel(NetworkConnector connector,
BrokerContainer brokerContainer,
String uri)
Constructor |
|
NetworkChannel(NetworkConnector connector,
BrokerContainer brokerContainer,
TransportChannel channel,
String remoteBrokerName,
String remoteclusterName)
Create a NetworkConnector from a TransportChannel |
|
NetworkChannel(PooledExecutor tp)
Default Constructor |
Method Summary | |
BrokerContainer |
getBrokerContainer()
|
ActiveMQConnection |
getLocalConnection()
|
int |
getMaximumRetries()
|
long |
getReconnectSleepTime()
|
String |
getRemoteBrokerName()
|
ActiveMQConnection |
getRemoteConnection()
|
String |
getRemotePassword()
|
String |
getRemoteUserName()
|
protected PooledExecutor |
getThreadPool()
|
String |
getUri()
|
protected void |
initialize()
|
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)
|
protected void |
setThreadPool(PooledExecutor threadPool)
|
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 |
Field Detail |
protected String uri
protected BrokerContainer brokerContainer
protected ActiveMQConnection localConnection
protected ActiveMQConnection remoteConnection
protected ConcurrentHashMap consumerMap
protected String remoteUserName
protected String remotePassword
protected String remoteBrokerName
protected String remoteClusterName
protected int maximumRetries
protected long reconnectSleepTime
protected PooledExecutor threadPool
Constructor Detail |
public NetworkChannel()
public NetworkChannel(PooledExecutor tp)
tp
- public NetworkChannel(NetworkConnector connector, BrokerContainer brokerContainer, String uri)
connector
- brokerContainer
- uri
- public NetworkChannel(NetworkConnector connector, BrokerContainer brokerContainer, TransportChannel channel, String remoteBrokerName, String remoteclusterName) throws JMSException
connector
- brokerContainer
- channel
- remoteBrokerName
- remoteclusterName
-
JMSException
Method Detail |
public String toString()
public void start()
start
in interface Service
public void stop() throws JMSException
stop
in interface Service
JMSException
- on errorpublic void onConsumerInfo(BrokerClient client, ConsumerInfo info)
onConsumerInfo
in interface ConsumerInfoListener
client
- info
- public String getUri()
public void setUri(String uri)
uri
- public String getRemotePassword()
public void setRemotePassword(String remotePassword)
remotePassword
- The remotePassword to set.public String getRemoteUserName()
public void setRemoteUserName(String remoteUserName)
remoteUserName
- The remoteUserName to set.public BrokerContainer getBrokerContainer()
public void setBrokerContainer(BrokerContainer brokerContainer)
brokerContainer
- The brokerContainer to set.public int getMaximumRetries()
public void setMaximumRetries(int maximumRetries)
public long getReconnectSleepTime()
public void setReconnectSleepTime(long reconnectSleepTime)
public String getRemoteBrokerName()
public void setRemoteBrokerName(String remoteBrokerName)
protected PooledExecutor getThreadPool()
protected void setThreadPool(PooledExecutor threadPool)
threadPool
- The threadPool to set.public ActiveMQConnection getLocalConnection() throws JMSException
JMSException
public ActiveMQConnection getRemoteConnection() throws JMSException
JMSException
protected void initialize() throws JMSException
JMSException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |