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 String
getGroup()
String
getRegistryURL()
long
getUpdateInterval()
boolean
isStartEmbeddRegistry()
void
registerService(String service)
register a servicevoid
resume()
void
serviceFailed(DiscoveryEvent devent)
A process actively using a service may see it go down before the DiscoveryAgent notices the service's failure.void
setBrokerName(String brokerName)
void
setDiscoveryListener(DiscoveryListener discoveryListener)
Sets the discovery listenervoid
setGroup(String group)
void
setRegistryURL(String discoveryRegistryURL)
void
setStartEmbeddRegistry(boolean startEmbeddRegistry)
void
setUpdateInterval(long updateInterval)
void
start()
void
stop()
void
suspend()
-
-
-
Method Detail
-
getGroup
public String getGroup()
-
registerService
public void registerService(String service) throws IOException
Description copied from interface:DiscoveryAgent
register a service- Specified by:
registerService
in interfaceDiscoveryAgent
- Throws:
IOException
-
serviceFailed
public void serviceFailed(DiscoveryEvent devent) throws IOException
Description copied from interface:DiscoveryAgent
A 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:
serviceFailed
in interfaceDiscoveryAgent
- Throws:
IOException
-
setBrokerName
public void setBrokerName(String brokerName)
-
setDiscoveryListener
public void setDiscoveryListener(DiscoveryListener discoveryListener)
Description copied from interface:DiscoveryAgent
Sets the discovery listener- Specified by:
setDiscoveryListener
in 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:
suspend
in interfaceSuspendable
- Throws:
Exception
-
resume
public void resume() throws Exception
- Specified by:
resume
in interfaceSuspendable
- Throws:
Exception
-
-