|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 ActiveMQConnection |
localConnection
|
protected int |
maximumRetries
|
protected ConcurrentHashMap |
queueConsumerMap
|
protected long |
reconnectSleepTime
|
protected String |
remoteBrokerName
|
protected String |
remoteClusterName
|
protected ActiveMQConnection |
remoteConnection
|
protected String |
remotePassword
|
protected String |
remoteUserName
|
protected PooledExecutor |
threadPool
|
protected ConcurrentHashMap |
topicConsumerMap
|
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 |
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 topicConsumerMap
protected ConcurrentHashMap queueConsumerMap
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 void statusChanged(TransportStatusEvent event)
TransportStatusEventListener
statusChanged
in interface TransportStatusEventListener
event
- TransportStatusEventListener.statusChanged(org.activemq.transport.TransportStatusEvent)
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 ActiveMQPrefetchPolicy getLocalPrefetchPolicy()
public void setLocalPrefetchPolicy(ActiveMQPrefetchPolicy localPrefetchPolicy)
localPrefetchPolicy
- The localPrefetchPolicy to set.public ActiveMQPrefetchPolicy getRemotePrefetchPolicy()
public void setRemotePrefetchPolicy(ActiveMQPrefetchPolicy remotePrefetchPolicy)
remotePrefetchPolicy
- The remotePrefetchPolicy to set.public boolean isDemandBasedForwarding()
public void setDemandBasedForwarding(boolean demandBasedForwarding)
demandBasedForwarding
- The demandBasedForwarding to set.public void onEvent(ConnectionAdvisoryEvent event)
onEvent
in interface ConnectionAdvisoryEventListener
event
- protected void initialize() throws JMSException
JMSException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |