org.codehaus.activemq.transport.zeroconf
Class ZeroconfDiscoveryAgent

java.lang.Object
  extended byorg.codehaus.activemq.transport.DiscoveryAgentSupport
      extended byorg.codehaus.activemq.transport.zeroconf.ZeroconfDiscoveryAgent
All Implemented Interfaces:
DiscoveryAgent, Service, javax.jmdns.ServiceListener

public class ZeroconfDiscoveryAgent
extends DiscoveryAgentSupport
implements javax.jmdns.ServiceListener

A DiscoveryAgent using Zeroconf via the jmDNS library

Version:
$Revision: 1.5 $

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)
           
 javax.jmdns.JmDNS getJmdns()
           
 InetAddress getLocalAddress()
           
 String getLocalhost()
           
 int getPriority()
           
 String getType()
           
 int getWeight()
           
 void registerService(String name, Map details)
           
 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 setJmdns(javax.jmdns.JmDNS jmdns)
           
 void setLocalAddress(InetAddress localAddress)
           
 void setLocalhost(String localhost)
           
 void setPriority(int priority)
           
 void setType(String type)
           
 void setWeight(int weight)
           
 void start()
          Called to start the service
 void stop()
          Called to shutdown the service
 
Methods inherited from class org.codehaus.activemq.transport.DiscoveryAgentSupport
getDiscoveryListener, setDiscoveryListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZeroconfDiscoveryAgent

public ZeroconfDiscoveryAgent()
Method Detail

start

public void start()
           throws JMSException
Description copied from interface: Service
Called to start the service

Specified by:
start in interface Service
Throws:
JMSException

stop

public void stop()
          throws JMSException
Description copied from interface: Service
Called to shutdown the service

Specified by:
stop in interface Service
Throws:
JMSException

registerService

public void registerService(String name,
                            Map details)
                     throws JMSException
Specified by:
registerService in interface DiscoveryAgent
Throws:
JMSException

addService

public void addService(javax.jmdns.JmDNS jmDNS,
                       String type,
                       String name)
Specified by:
addService in interface javax.jmdns.ServiceListener

removeService

public void removeService(javax.jmdns.JmDNS jmDNS,
                          String type,
                          String name)
Specified by:
removeService in interface javax.jmdns.ServiceListener

resolveService

public void resolveService(javax.jmdns.JmDNS jmDNS,
                           String type,
                           String name,
                           javax.jmdns.ServiceInfo serviceInfo)
Specified by:
resolveService in interface javax.jmdns.ServiceListener

getType

public String getType()

setType

public void setType(String type)

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

getWeight

public int getWeight()

setWeight

public void setWeight(int weight)

getJmdns

public javax.jmdns.JmDNS getJmdns()

setJmdns

public void setJmdns(javax.jmdns.JmDNS jmdns)

getLocalAddress

public InetAddress getLocalAddress()
                            throws UnknownHostException
Throws:
UnknownHostException

setLocalAddress

public void setLocalAddress(InetAddress localAddress)

getLocalhost

public String getLocalhost()

setLocalhost

public void setLocalhost(String localhost)

createServiceInfo

protected javax.jmdns.ServiceInfo createServiceInfo(String name,
                                                    Map map)

createJmDNS

protected javax.jmdns.JmDNS createJmDNS()
                                 throws IOException
Throws:
IOException

createLocalAddress

protected InetAddress createLocalAddress()
                                  throws UnknownHostException
Throws:
UnknownHostException


Copyright © 2004 Protique, Ltd.. All Rights Reserved.