org.apache.activemq.network
public abstract class DemandForwardingBridgeSupport extends java.lang.Object implements NetworkBridge, BrokerServiceAware
Constructor and Description |
---|
DemandForwardingBridgeSupport(NetworkBridgeConfiguration configuration,
Transport localBroker,
Transport remoteBroker) |
protected static final java.lang.String DURABLE_SUB_PREFIX
protected final Transport localBroker
protected final Transport remoteBroker
protected final IdGenerator idGenerator
protected final LongSequenceGenerator consumerIdGenerator
protected ConnectionInfo localConnectionInfo
protected ConnectionInfo remoteConnectionInfo
protected SessionInfo localSessionInfo
protected ProducerInfo producerInfo
protected java.lang.String remoteBrokerName
protected java.lang.String localClientId
protected ConsumerInfo demandConsumerInfo
protected int demandConsumerDispatched
protected final java.util.concurrent.atomic.AtomicBoolean localBridgeStarted
protected final java.util.concurrent.atomic.AtomicBoolean remoteBridgeStarted
protected java.util.concurrent.atomic.AtomicBoolean disposed
protected BrokerId localBrokerId
protected ActiveMQDestination[] excludedDestinations
protected ActiveMQDestination[] dynamicallyIncludedDestinations
protected ActiveMQDestination[] staticallyIncludedDestinations
protected ActiveMQDestination[] durableDestinations
protected final java.util.concurrent.ConcurrentHashMap<ConsumerId,DemandSubscription> subscriptionMapByLocalId
protected final java.util.concurrent.ConcurrentHashMap<ConsumerId,DemandSubscription> subscriptionMapByRemoteId
protected final BrokerId[] localBrokerPath
protected java.util.concurrent.CountDownLatch startedLatch
protected java.util.concurrent.CountDownLatch localStartedLatch
protected final java.util.concurrent.atomic.AtomicBoolean lastConnectSucceeded
protected NetworkBridgeConfiguration configuration
protected final NetworkBridgeFilterFactory defaultFilterFactory
protected final BrokerId[] remoteBrokerPath
protected java.lang.Object brokerInfoMutex
protected BrokerId remoteBrokerId
public DemandForwardingBridgeSupport(NetworkBridgeConfiguration configuration, Transport localBroker, Transport remoteBroker)
public void duplexStart(TransportConnection connection, BrokerInfo localBrokerInfo, BrokerInfo remoteBrokerInfo) throws java.lang.Exception
java.lang.Exception
public void start() throws java.lang.Exception
protected void triggerLocalStartBridge() throws java.io.IOException
java.io.IOException
protected void triggerRemoteStartBridge() throws java.io.IOException
java.io.IOException
protected void startRemoteBridge() throws java.lang.Exception
java.lang.Exception
public void stop() throws java.lang.Exception
public void serviceRemoteException(java.lang.Throwable error)
NetworkBridge
serviceRemoteException
in interface NetworkBridge
protected void serviceRemoteCommand(Command command)
public void serviceLocalException(java.lang.Throwable error)
NetworkBridge
serviceLocalException
in interface NetworkBridge
protected Service getControllingService()
protected void addSubscription(DemandSubscription sub) throws java.io.IOException
java.io.IOException
protected void removeSubscription(DemandSubscription sub) throws java.io.IOException
java.io.IOException
protected Message configureMessage(MessageDispatch md)
protected void serviceLocalCommand(Command command)
public ActiveMQDestination[] getDynamicallyIncludedDestinations()
public void setDynamicallyIncludedDestinations(ActiveMQDestination[] dynamicallyIncludedDestinations)
dynamicallyIncludedDestinations
- The
dynamicallyIncludedDestinations to set.public ActiveMQDestination[] getExcludedDestinations()
public void setExcludedDestinations(ActiveMQDestination[] excludedDestinations)
excludedDestinations
- The excludedDestinations to set.public ActiveMQDestination[] getStaticallyIncludedDestinations()
public void setStaticallyIncludedDestinations(ActiveMQDestination[] staticallyIncludedDestinations)
staticallyIncludedDestinations
- The staticallyIncludedDestinations
to set.public ActiveMQDestination[] getDurableDestinations()
public void setDurableDestinations(ActiveMQDestination[] durableDestinations)
durableDestinations
- The durableDestinations to set.public Transport getLocalBroker()
public Transport getRemoteBroker()
public boolean isCreatedByDuplex()
public void setCreatedByDuplex(boolean createdByDuplex)
createdByDuplex
- the createdByDuplex to setprotected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId[] pathsToAppend)
protected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId idToAppend)
protected boolean isPermissableDestination(ActiveMQDestination destination)
protected boolean isPermissableDestination(ActiveMQDestination destination, boolean allowTemporary)
protected void setupStaticDestinations()
protected boolean addConsumerInfo(ConsumerInfo consumerInfo) throws java.io.IOException
java.io.IOException
protected DemandSubscription createDemandSubscription(ConsumerInfo info) throws java.io.IOException
java.io.IOException
protected DemandSubscription doCreateDemandSubscription(ConsumerInfo info) throws java.io.IOException
java.io.IOException
protected final DemandSubscription createDemandSubscription(ActiveMQDestination destination)
protected void configureDemandSubscription(ConsumerInfo info, DemandSubscription sub) throws java.io.IOException
java.io.IOException
protected void removeDemandSubscription(ConsumerId id) throws java.io.IOException
java.io.IOException
protected boolean removeDemandSubscriptionByLocalId(ConsumerId consumerId)
protected void waitStarted() throws java.lang.InterruptedException
java.lang.InterruptedException
protected void clearDownSubscriptions()
protected NetworkBridgeFilter createNetworkBridgeFilter(ConsumerInfo info) throws java.io.IOException
java.io.IOException
protected void serviceLocalBrokerInfo(Command command) throws java.lang.InterruptedException
java.lang.InterruptedException
protected void addRemoteBrokerToBrokerPath(ConsumerInfo info) throws java.io.IOException
java.io.IOException
protected void serviceRemoteBrokerInfo(Command command) throws java.io.IOException
java.io.IOException
protected BrokerId[] getRemoteBrokerPath()
public void setNetworkBridgeListener(NetworkBridgeListener listener)
NetworkBridge
setNetworkBridgeListener
in interface NetworkBridge
public java.lang.String getRemoteAddress()
getRemoteAddress
in interface NetworkBridge
public java.lang.String getLocalAddress()
getLocalAddress
in interface NetworkBridge
public java.lang.String getRemoteBrokerName()
getRemoteBrokerName
in interface NetworkBridge
public java.lang.String getLocalBrokerName()
getLocalBrokerName
in interface NetworkBridge
public long getDequeueCounter()
getDequeueCounter
in interface NetworkBridge
public long getEnqueueCounter()
getEnqueueCounter
in interface NetworkBridge
protected boolean isDuplex()
public java.util.concurrent.ConcurrentHashMap<ConsumerId,DemandSubscription> getLocalSubscriptionMap()
public void setBrokerService(BrokerService brokerService)
setBrokerService
in interface BrokerServiceAware
public void setMbeanObjectName(javax.management.ObjectName objectName)
setMbeanObjectName
in interface NetworkBridge
public javax.management.ObjectName getMbeanObjectName()
getMbeanObjectName
in interface NetworkBridge
Copyright © 2005-2014. All Rights Reserved.