|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.transport.discovery.rendezvous.RendezvousDiscoveryAgent
public class RendezvousDiscoveryAgent
A DiscoveryAgent
using Zeroconf
via the jmDNS library
Constructor Summary | |
---|---|
RendezvousDiscoveryAgent()
|
Method Summary | |
---|---|
void |
addService(JmDNS jmDNS,
String type,
String name)
|
protected JmDNS |
createJmDNS()
|
protected InetAddress |
createLocalAddress()
|
protected ServiceInfo |
createServiceInfo(String name,
Map map)
|
String |
getGroup()
|
JmDNS |
getJmdns()
|
InetAddress |
getLocalAddress()
|
String |
getLocalhost()
|
int |
getPriority()
|
String |
getType()
|
int |
getWeight()
|
void |
registerService(String name)
register a service |
void |
removeService(JmDNS jmDNS,
String type,
String name)
|
void |
resolveService(JmDNS jmDNS,
String type,
String name,
ServiceInfo serviceInfo)
|
void |
serviceAdded(ServiceEvent event)
A service has been added. |
void |
serviceFailed(DiscoveryEvent event)
A process actively using a service may see it go down before the DiscoveryAgent notices the service's failure. |
void |
serviceRemoved(ServiceEvent event)
A service has been removed. |
void |
serviceResolved(ServiceEvent event)
A service has been resolved. |
void |
setBrokerName(String brokerName)
|
void |
setDiscoveryListener(DiscoveryListener listener)
Sets the discovery listener |
void |
setGroup(String group)
|
void |
setJmdns(JmDNS jmdns)
|
void |
setLocalAddress(InetAddress localAddress)
|
void |
setLocalhost(String localhost)
|
void |
setPriority(int priority)
|
void |
setWeight(int weight)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RendezvousDiscoveryAgent()
Method Detail |
---|
public void start() throws Exception
start
in interface Service
Exception
public void stop()
stop
in interface Service
public void registerService(String name) throws IOException
DiscoveryAgent
registerService
in interface DiscoveryAgent
IOException
public void addService(JmDNS jmDNS, String type, String name)
public void removeService(JmDNS jmDNS, String type, String name)
public void serviceAdded(ServiceEvent event)
ServiceListener
serviceAdded
in interface ServiceListener
event
- The ServiceEvent providing the name and fully qualified type
of the service.public void serviceRemoved(ServiceEvent event)
ServiceListener
serviceRemoved
in interface ServiceListener
event
- The ServiceEvent providing the name and fully qualified type
of the service.public void serviceResolved(ServiceEvent event)
ServiceListener
serviceResolved
in interface ServiceListener
event
- The ServiceEvent providing the name, the fully qualified
type of the service, and the service info record, or null if the service
could not be resolved.public void resolveService(JmDNS jmDNS, String type, String name, ServiceInfo serviceInfo)
public int getPriority()
public void setPriority(int priority)
public int getWeight()
public void setWeight(int weight)
public JmDNS getJmdns() throws IOException
IOException
public void setJmdns(JmDNS jmdns)
public InetAddress getLocalAddress() throws UnknownHostException
UnknownHostException
public void setLocalAddress(InetAddress localAddress)
public String getLocalhost()
public void setLocalhost(String localhost)
protected ServiceInfo createServiceInfo(String name, Map map)
protected JmDNS createJmDNS() throws IOException
IOException
protected InetAddress createLocalAddress() throws UnknownHostException
UnknownHostException
public void setDiscoveryListener(DiscoveryListener listener)
DiscoveryAgent
setDiscoveryListener
in interface DiscoveryAgent
public String getGroup()
getGroup
in interface DiscoveryAgent
public void setGroup(String group)
setGroup
in interface DiscoveryAgent
public String getType()
public void setBrokerName(String brokerName)
setBrokerName
in interface DiscoveryAgent
public void serviceFailed(DiscoveryEvent event) throws IOException
DiscoveryAgent
serviceFailed
in interface DiscoveryAgent
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |