Package org.apache.activemq.network
Class DiscoveryNetworkConnector
- java.lang.Object
-
- org.apache.activemq.network.NetworkBridgeConfiguration
-
- org.apache.activemq.network.NetworkConnector
-
- org.apache.activemq.network.DiscoveryNetworkConnector
-
- All Implemented Interfaces:
Service
,DiscoveryListener
public class DiscoveryNetworkConnector extends NetworkConnector implements DiscoveryListener
A network connector which uses a discovery agent to detect the remote brokers available and setup a connection to each available remote broker
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.network.NetworkConnector
bridges, connectionFilter, localURI, serviceSupport
-
Fields inherited from class org.apache.activemq.network.NetworkBridgeConfiguration
dynamicallyIncludedDestinations, excludedDestinations, staticallyIncludedDestinations
-
Fields inherited from interface org.apache.activemq.transport.discovery.DiscoveryListener
DISCOVERED_OPTION_PREFIX
-
-
Constructor Summary
Constructors Constructor Description DiscoveryNetworkConnector()
DiscoveryNetworkConnector(URI discoveryURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NetworkBridge
createBridge(Transport localTransport, Transport remoteTransport, DiscoveryEvent event)
DiscoveryAgent
getDiscoveryAgent()
URI
getUri()
protected void
handleStart()
protected void
handleStop(ServiceStopper stopper)
void
onServiceAdd(DiscoveryEvent event)
void
onServiceRemove(DiscoveryEvent event)
void
setDiscoveryAgent(DiscoveryAgent discoveryAgent)
void
setUri(URI discoveryURI)
String
toString()
-
Methods inherited from class org.apache.activemq.network.NetworkConnector
activeBridges, addDynamicallyIncludedDestination, addExcludedDestination, addStaticallyIncludedDestination, configureBridge, createLocalTransport, createNetworkBridgeObjectName, getBrokerService, getConnectionFilter, getDurableDestinations, getDurableTopicDestinations, getLocalUri, getObjectName, isStarted, isStopped, isStopping, registerNetworkBridgeMBean, removeDemandSubscription, setBrokerService, setConnectionFilter, setDurableDestinations, setLocalUri, setObjectName, start, stop, unregisterNetworkBridgeMBean
-
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, isUseVirtualDestSus, 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
-
-
-
-
Constructor Detail
-
DiscoveryNetworkConnector
public DiscoveryNetworkConnector()
-
DiscoveryNetworkConnector
public DiscoveryNetworkConnector(URI discoveryURI) throws IOException
- Throws:
IOException
-
-
Method Detail
-
setUri
public void setUri(URI discoveryURI) throws IOException
- Throws:
IOException
-
getUri
public URI getUri()
-
onServiceAdd
public void onServiceAdd(DiscoveryEvent event)
- Specified by:
onServiceAdd
in interfaceDiscoveryListener
-
onServiceRemove
public void onServiceRemove(DiscoveryEvent event)
- Specified by:
onServiceRemove
in interfaceDiscoveryListener
-
getDiscoveryAgent
public DiscoveryAgent getDiscoveryAgent()
-
setDiscoveryAgent
public void setDiscoveryAgent(DiscoveryAgent discoveryAgent)
-
handleStart
protected void handleStart() throws Exception
- Overrides:
handleStart
in classNetworkConnector
- Throws:
Exception
-
handleStop
protected void handleStop(ServiceStopper stopper) throws Exception
- Overrides:
handleStop
in classNetworkConnector
- Throws:
Exception
-
createBridge
protected NetworkBridge createBridge(Transport localTransport, Transport remoteTransport, DiscoveryEvent event)
-
-