|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.transport.discovery.zeroconf.ZeroconfDiscoveryAgent
public class ZeroconfDiscoveryAgent
A DiscoveryAgent using Zeroconf
via the jmDNS library
| Constructor Summary | |
|---|---|
ZeroconfDiscoveryAgent()
|
|
| Method Summary | |
|---|---|
void |
addService(javax.jmdns.JmDNS jmDNS,
String type,
String name)
|
protected javax.jmdns.JmDNS |
createJmDNS()
|
protected InetAddress |
createLocalAddress()
|
protected javax.jmdns.ServiceInfo |
createServiceInfo(String name,
Map map)
|
String |
getGroup()
|
javax.jmdns.JmDNS |
getJmdns()
|
InetAddress |
getLocalAddress()
|
String |
getLocalhost()
|
int |
getPriority()
|
String |
getType()
|
int |
getWeight()
|
void |
registerService(String name)
register a service |
void |
removeService(javax.jmdns.JmDNS jmDNS,
String type,
String name)
|
void |
resolveService(javax.jmdns.JmDNS jmDNS,
String type,
String name,
javax.jmdns.ServiceInfo serviceInfo)
|
void |
serviceAdded(javax.jmdns.ServiceEvent event)
|
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(javax.jmdns.ServiceEvent event)
|
void |
serviceResolved(javax.jmdns.ServiceEvent event)
|
void |
setDiscoveryListener(DiscoveryListener listener)
Sets the discovery listener |
void |
setGroup(String group)
|
void |
setJmdns(javax.jmdns.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 ZeroconfDiscoveryAgent()
| Method Detail |
|---|
public void start()
throws Exception
start in interface ServiceExceptionpublic void stop()
stop in interface Service
public void registerService(String name)
throws IOException
DiscoveryAgent
registerService in interface DiscoveryAgentIOException
public void addService(javax.jmdns.JmDNS jmDNS,
String type,
String name)
public void removeService(javax.jmdns.JmDNS jmDNS,
String type,
String name)
public void serviceAdded(javax.jmdns.ServiceEvent event)
serviceAdded in interface javax.jmdns.ServiceListenerpublic void serviceRemoved(javax.jmdns.ServiceEvent event)
serviceRemoved in interface javax.jmdns.ServiceListenerpublic void serviceResolved(javax.jmdns.ServiceEvent event)
serviceResolved in interface javax.jmdns.ServiceListener
public void resolveService(javax.jmdns.JmDNS jmDNS,
String type,
String name,
javax.jmdns.ServiceInfo serviceInfo)
public int getPriority()
public void setPriority(int priority)
public int getWeight()
public void setWeight(int weight)
public javax.jmdns.JmDNS getJmdns()
throws IOException
IOExceptionpublic void setJmdns(javax.jmdns.JmDNS jmdns)
public InetAddress getLocalAddress()
throws UnknownHostException
UnknownHostExceptionpublic void setLocalAddress(InetAddress localAddress)
public String getLocalhost()
public void setLocalhost(String localhost)
protected javax.jmdns.ServiceInfo createServiceInfo(String name,
Map map)
protected javax.jmdns.JmDNS createJmDNS()
throws IOException
IOException
protected InetAddress createLocalAddress()
throws UnknownHostException
UnknownHostExceptionpublic void setDiscoveryListener(DiscoveryListener listener)
DiscoveryAgent
setDiscoveryListener in interface DiscoveryAgentpublic String getGroup()
public void setGroup(String group)
public String getType()
public void serviceFailed(DiscoveryEvent event)
throws IOException
DiscoveryAgent
serviceFailed in interface DiscoveryAgentIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||