Package org.apache.activemq.network
Class NetworkConnector
- java.lang.Object
-
- org.apache.activemq.network.NetworkBridgeConfiguration
-
- org.apache.activemq.network.NetworkConnector
-
- All Implemented Interfaces:
org.apache.activemq.Service
- Direct Known Subclasses:
DiscoveryNetworkConnector
,LdapNetworkConnector
,MulticastNetworkConnector
public abstract class NetworkConnector extends NetworkBridgeConfiguration implements org.apache.activemq.Service
Connector class for bridging broker networks.
-
-
Field Summary
Fields Modifier and Type Field Description protected ConcurrentMap<URI,NetworkBridge>
bridges
protected ConnectionFilter
connectionFilter
protected URI
localURI
protected org.apache.activemq.util.ServiceSupport
serviceSupport
-
Fields inherited from class org.apache.activemq.network.NetworkBridgeConfiguration
dynamicallyIncludedDestinations, excludedDestinations, staticallyIncludedDestinations
-
-
Constructor Summary
Constructors Constructor Description NetworkConnector()
NetworkConnector(URI localURI)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<NetworkBridge>
activeBridges()
void
addDynamicallyIncludedDestination(org.apache.activemq.command.ActiveMQDestination destination)
void
addExcludedDestination(org.apache.activemq.command.ActiveMQDestination destination)
void
addStaticallyIncludedDestination(org.apache.activemq.command.ActiveMQDestination destination)
protected NetworkBridge
configureBridge(DemandForwardingBridgeSupport result)
protected org.apache.activemq.transport.Transport
createLocalTransport()
protected ObjectName
createNetworkBridgeObjectName(NetworkBridge bridge)
BrokerService
getBrokerService()
ConnectionFilter
getConnectionFilter()
Set<org.apache.activemq.command.ActiveMQDestination>
getDurableDestinations()
static org.apache.activemq.command.ActiveMQDestination[]
getDurableTopicDestinations(Set<org.apache.activemq.command.ActiveMQDestination> durableDestinations)
URI
getLocalUri()
ObjectName
getObjectName()
protected void
handleStart()
protected void
handleStop(org.apache.activemq.util.ServiceStopper stopper)
boolean
isStarted()
boolean
isStopped()
boolean
isStopping()
protected void
registerNetworkBridgeMBean(NetworkBridge bridge)
boolean
removeDemandSubscription(org.apache.activemq.command.ConsumerId consumerId)
void
setBrokerService(BrokerService brokerService)
void
setConnectionFilter(ConnectionFilter connectionFilter)
void
setDurableDestinations(Set<org.apache.activemq.command.ActiveMQDestination> durableDestinations)
void
setLocalUri(URI localURI)
void
setObjectName(ObjectName objectName)
void
start()
void
stop()
protected void
unregisterNetworkBridgeMBean(NetworkBridge bridge)
-
Methods inherited from class org.apache.activemq.network.NetworkBridgeConfiguration
getAdvisoryAckPercentage, getAdvisoryPrefetchSize, getBridgeFactory, getBrokerName, getBrokerURL, getClientIdToken, getConsumerPriorityBase, getConsumerTTL, getDestinationFilter, getDynamicallyIncludedDestinations, getExcludedDestinations, getGcSweepTime, getMessageTTL, getName, getNetworkTTL, getPassword, getPrefetchSize, getRemotePassword, getRemoteUserName, getSslContext, getStaticallyIncludedDestinations, getUserName, isAdvisoryForFailedForward, isAlwaysSyncSend, isBridgeTempDestinations, isCheckDuplicateMessagesOnDuplex, isConduitNetworkQueueSubscriptions, isConduitSubscriptions, isDecreaseNetworkConsumerPriority, isDispatchAsync, isDuplex, isDynamicOnly, isGcDestinationViews, isStaticBridge, isSuppressDuplicateQueueSubscriptions, isSuppressDuplicateTopicSubscriptions, isSyncDurableSubs, isUseBrokerNamesAsIdSeed, isUseCompression, isUseVirtualDestSubs, setAdvisoryAckPercentage, setAdvisoryForFailedForward, setAdvisoryPrefetchSize, setAlwaysSyncSend, setBridgeFactory, setBridgeTempDestinations, setBrokerName, setBrokerURL, setCheckDuplicateMessagesOnDuplex, setClientIdToken, setConduitNetworkQueueSubscriptions, setConduitSubscriptions, setConsumerPriorityBase, setConsumerTTL, setDecreaseNetworkConsumerPriority, setDestinationFilter, setDispatchAsync, setDuplex, setDynamicallyIncludedDestinations, setDynamicOnly, setExcludedDestinations, setGcDestinationViews, setGcSweepTime, setMessageTTL, setName, setNetworkTTL, setPassword, setPrefetchSize, setRemotePassword, setRemoteUserName, setSslContext, setStaticallyIncludedDestinations, setStaticBridge, setSuppressDuplicateQueueSubscriptions, setSuppressDuplicateTopicSubscriptions, setSyncDurableSubs, setUseBrokerNameAsIdSees, setUseCompression, setUserName, setUseVirtualDestSubs
-
-
-
-
Field Detail
-
localURI
protected URI localURI
-
connectionFilter
protected ConnectionFilter connectionFilter
-
bridges
protected ConcurrentMap<URI,NetworkBridge> bridges
-
serviceSupport
protected org.apache.activemq.util.ServiceSupport serviceSupport
-
-
Constructor Detail
-
NetworkConnector
public NetworkConnector()
-
NetworkConnector
public NetworkConnector(URI localURI)
-
-
Method Detail
-
getLocalUri
public URI getLocalUri() throws URISyntaxException
- Throws:
URISyntaxException
-
setLocalUri
public void setLocalUri(URI localURI)
-
getDurableDestinations
public Set<org.apache.activemq.command.ActiveMQDestination> getDurableDestinations()
- Returns:
- Returns the durableDestinations.
-
setDurableDestinations
public void setDurableDestinations(Set<org.apache.activemq.command.ActiveMQDestination> durableDestinations)
- Parameters:
durableDestinations
- The durableDestinations to set.
-
addExcludedDestination
public void addExcludedDestination(org.apache.activemq.command.ActiveMQDestination destination)
-
addStaticallyIncludedDestination
public void addStaticallyIncludedDestination(org.apache.activemq.command.ActiveMQDestination destination)
-
addDynamicallyIncludedDestination
public void addDynamicallyIncludedDestination(org.apache.activemq.command.ActiveMQDestination destination)
-
getConnectionFilter
public ConnectionFilter getConnectionFilter()
-
setConnectionFilter
public void setConnectionFilter(ConnectionFilter connectionFilter)
-
configureBridge
protected NetworkBridge configureBridge(DemandForwardingBridgeSupport result)
-
createLocalTransport
protected org.apache.activemq.transport.Transport createLocalTransport() throws Exception
- Throws:
Exception
-
getDurableTopicDestinations
public static org.apache.activemq.command.ActiveMQDestination[] getDurableTopicDestinations(Set<org.apache.activemq.command.ActiveMQDestination> durableDestinations)
-
start
public void start() throws Exception
- Specified by:
start
in interfaceorg.apache.activemq.Service
- Throws:
Exception
-
stop
public void stop() throws Exception
- Specified by:
stop
in interfaceorg.apache.activemq.Service
- Throws:
Exception
-
handleStop
protected void handleStop(org.apache.activemq.util.ServiceStopper stopper) throws Exception
- Throws:
Exception
-
isStarted
public boolean isStarted()
-
isStopped
public boolean isStopped()
-
isStopping
public boolean isStopping()
-
getObjectName
public ObjectName getObjectName()
-
setObjectName
public void setObjectName(ObjectName objectName)
-
getBrokerService
public BrokerService getBrokerService()
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
-
registerNetworkBridgeMBean
protected void registerNetworkBridgeMBean(NetworkBridge bridge)
-
unregisterNetworkBridgeMBean
protected void unregisterNetworkBridgeMBean(NetworkBridge bridge)
-
createNetworkBridgeObjectName
protected ObjectName createNetworkBridgeObjectName(NetworkBridge bridge) throws MalformedObjectNameException
- Throws:
MalformedObjectNameException
-
removeDemandSubscription
public boolean removeDemandSubscription(org.apache.activemq.command.ConsumerId consumerId)
-
activeBridges
public Collection<NetworkBridge> activeBridges()
-
-