|
||||||||||
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(JmDNS jmDNS,
java.lang.String type,
java.lang.String name)
|
protected JmDNS |
createJmDNS()
|
protected java.net.InetAddress |
createLocalAddress()
|
protected ServiceInfo |
createServiceInfo(java.lang.String name,
java.util.Map map)
|
java.lang.String |
getGroup()
|
JmDNS |
getJmdns()
|
java.net.InetAddress |
getLocalAddress()
|
java.lang.String |
getLocalhost()
|
int |
getPriority()
|
java.lang.String |
getType()
|
int |
getWeight()
|
void |
registerService(java.lang.String name)
register a service |
void |
removeService(JmDNS jmDNS,
java.lang.String type,
java.lang.String name)
|
void |
resolveService(JmDNS jmDNS,
java.lang.String type,
java.lang.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 |
setDiscoveryListener(DiscoveryListener listener)
Sets the discovery listener |
void |
setGroup(java.lang.String group)
|
void |
setJmdns(JmDNS jmdns)
|
void |
setLocalAddress(java.net.InetAddress localAddress)
|
void |
setLocalhost(java.lang.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 java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop()
stop
in interface Service
public void registerService(java.lang.String name) throws java.io.IOException
DiscoveryAgent
registerService
in interface DiscoveryAgent
java.io.IOException
public void addService(JmDNS jmDNS, java.lang.String type, java.lang.String name)
public void removeService(JmDNS jmDNS, java.lang.String type, java.lang.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, java.lang.String type, java.lang.String name, ServiceInfo serviceInfo)
public int getPriority()
public void setPriority(int priority)
public int getWeight()
public void setWeight(int weight)
public JmDNS getJmdns() throws java.io.IOException
java.io.IOException
public void setJmdns(JmDNS jmdns)
public java.net.InetAddress getLocalAddress() throws java.net.UnknownHostException
java.net.UnknownHostException
public void setLocalAddress(java.net.InetAddress localAddress)
public java.lang.String getLocalhost()
public void setLocalhost(java.lang.String localhost)
protected ServiceInfo createServiceInfo(java.lang.String name, java.util.Map map)
protected JmDNS createJmDNS() throws java.io.IOException
java.io.IOException
protected java.net.InetAddress createLocalAddress() throws java.net.UnknownHostException
java.net.UnknownHostException
public void setDiscoveryListener(DiscoveryListener listener)
DiscoveryAgent
setDiscoveryListener
in interface DiscoveryAgent
public java.lang.String getGroup()
public void setGroup(java.lang.String group)
public java.lang.String getType()
public void serviceFailed(DiscoveryEvent event) throws java.io.IOException
DiscoveryAgent
serviceFailed
in interface DiscoveryAgent
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |