Class HTTPDiscoveryAgent
- java.lang.Object
-
- org.apache.activemq.transport.discovery.http.HTTPDiscoveryAgent
-
- All Implemented Interfaces:
Service,DiscoveryAgent,Suspendable
public class HTTPDiscoveryAgent extends Object implements DiscoveryAgent, Suspendable
-
-
Constructor Summary
Constructors Constructor Description HTTPDiscoveryAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetGroup()StringgetRegistryURL()longgetUpdateInterval()booleanisStartEmbeddRegistry()voidregisterService(String service)register a servicevoidresume()voidserviceFailed(DiscoveryEvent devent)A process actively using a service may see it go down before the DiscoveryAgent notices the service's failure.voidsetBrokerName(String brokerName)voidsetDiscoveryListener(DiscoveryListener discoveryListener)Sets the discovery listenervoidsetGroup(String group)voidsetRegistryURL(String discoveryRegistryURL)voidsetStartEmbeddRegistry(boolean startEmbeddRegistry)voidsetUpdateInterval(long updateInterval)voidstart()voidstop()voidsuspend()
-
-
-
Method Detail
-
getGroup
public String getGroup()
-
registerService
public void registerService(String service) throws IOException
Description copied from interface:DiscoveryAgentregister a service- Specified by:
registerServicein interfaceDiscoveryAgent- Throws:
IOException
-
serviceFailed
public void serviceFailed(DiscoveryEvent devent) throws IOException
Description copied from interface:DiscoveryAgentA process actively using a service may see it go down before the DiscoveryAgent notices the service's failure. That process can use this method to notify the DiscoveryAgent of the failure so that other listeners of this DiscoveryAgent can also be made aware of the failure.- Specified by:
serviceFailedin interfaceDiscoveryAgent- Throws:
IOException
-
setBrokerName
public void setBrokerName(String brokerName)
-
setDiscoveryListener
public void setDiscoveryListener(DiscoveryListener discoveryListener)
Description copied from interface:DiscoveryAgentSets the discovery listener- Specified by:
setDiscoveryListenerin interfaceDiscoveryAgent
-
setGroup
public void setGroup(String group)
-
start
public void start() throws Exception
-
getRegistryURL
public String getRegistryURL()
-
setRegistryURL
public void setRegistryURL(String discoveryRegistryURL)
-
getUpdateInterval
public long getUpdateInterval()
-
setUpdateInterval
public void setUpdateInterval(long updateInterval)
-
isStartEmbeddRegistry
public boolean isStartEmbeddRegistry()
-
setStartEmbeddRegistry
public void setStartEmbeddRegistry(boolean startEmbeddRegistry)
-
suspend
public void suspend() throws Exception- Specified by:
suspendin interfaceSuspendable- Throws:
Exception
-
resume
public void resume() throws Exception- Specified by:
resumein interfaceSuspendable- Throws:
Exception
-
-