org.apache.activemq.network
Class DiscoveryNetworkConnector

java.lang.Object
  extended by org.apache.activemq.network.NetworkBridgeConfiguration
      extended by org.apache.activemq.network.NetworkConnector
          extended by 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 interface org.apache.activemq.transport.discovery.DiscoveryListener
DISCOVERED_OPTION_PREFIX
 
Constructor Summary
DiscoveryNetworkConnector()
           
DiscoveryNetworkConnector(URI discoveryURI)
           
 
Method Summary
protected  NetworkBridge createBridge(Transport localTransport, Transport remoteTransport, DiscoveryEvent event)
           
 DiscoveryAgent getDiscoveryAgent()
           
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, getDynamicallyIncludedDestinations, getExcludedDestinations, getLocalUri, getObjectName, getStaticallyIncludedDestinations, isStarted, isStopped, isStopping, registerNetworkBridgeMBean, removeDemandSubscription, setBrokerService, setConnectionFilter, setDurableDestinations, setDynamicallyIncludedDestinations, setExcludedDestinations, setLocalUri, setObjectName, setStaticallyIncludedDestinations, start, stop, unregisterNetworkBridgeMBean
 
Methods inherited from class org.apache.activemq.network.NetworkBridgeConfiguration
getBrokerName, getBrokerURL, getConsumerPriorityBase, getDestinationFilter, getName, getNetworkTTL, getPassword, getPrefetchSize, getUserName, isAlwaysSyncSend, isBridgeTempDestinations, isConduitSubscriptions, isDecreaseNetworkConsumerPriority, isDispatchAsync, isDuplex, isDynamicOnly, isStaticBridge, isSuppressDuplicateQueueSubscriptions, isSuppressDuplicateTopicSubscriptions, isUseCompression, setAlwaysSyncSend, setBridgeTempDestinations, setBrokerName, setBrokerURL, setConduitSubscriptions, setConsumerPriorityBase, setDecreaseNetworkConsumerPriority, setDestinationFilter, setDispatchAsync, setDuplex, setDynamicOnly, setName, setNetworkTTL, setPassword, setPrefetchSize, setStaticBridge, setSuppressDuplicateQueueSubscriptions, setSuppressDuplicateTopicSubscriptions, setUseCompression, setUserName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

onServiceAdd

public void onServiceAdd(DiscoveryEvent event)
Specified by:
onServiceAdd in interface DiscoveryListener

onServiceRemove

public void onServiceRemove(DiscoveryEvent event)
Specified by:
onServiceRemove in interface DiscoveryListener

getDiscoveryAgent

public DiscoveryAgent getDiscoveryAgent()

setDiscoveryAgent

public void setDiscoveryAgent(DiscoveryAgent discoveryAgent)

handleStart

protected void handleStart()
                    throws Exception
Overrides:
handleStart in class NetworkConnector
Throws:
Exception

handleStop

protected void handleStop(ServiceStopper stopper)
                   throws Exception
Overrides:
handleStop in class NetworkConnector
Throws:
Exception

createBridge

protected NetworkBridge createBridge(Transport localTransport,
                                     Transport remoteTransport,
                                     DiscoveryEvent event)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.