org.qtunes.zeroconf.spi.jmdns
Class JmDNSZeroConf

java.lang.Object
  extended by org.qtunes.zeroconf.spi.jmdns.JmDNSZeroConf
All Implemented Interfaces:
Service, ZeroConf

public class JmDNSZeroConf
extends java.lang.Object
implements ZeroConf


Constructor Summary
JmDNSZeroConf()
           
 
Method Summary
 ServiceContext getContext()
          Return the ServiceContext that was passed into Service.startService(org.qtunes.core.ServiceContext)
 ZCServiceInfo[] list(java.lang.String type, int ms)
          Search for a maximum of ms ms for services of the specified type.
 ZCService register(java.lang.String type, java.lang.String name, int port, java.util.Map<java.lang.String,java.lang.String> properties)
           
 java.util.Map<java.lang.String,java.lang.Object> reportState()
          Return a Map describing the state of this Service, for serialization back to any client that needs to know (eg webplayer) - so values should be serializable objects, eg Lists, Maps or simple objects.
 void startService(ServiceContext context)
          Start the Service
 void stopService(ServiceContext context)
          Stop the Service
 void unregister(ZCService service)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmDNSZeroConf

public JmDNSZeroConf()
Method Detail

register

public ZCService register(java.lang.String type,
                          java.lang.String name,
                          int port,
                          java.util.Map<java.lang.String,java.lang.String> properties)
Specified by:
register in interface ZeroConf

unregister

public void unregister(ZCService service)
Specified by:
unregister in interface ZeroConf

list

public ZCServiceInfo[] list(java.lang.String type,
                            int ms)
Description copied from interface: ZeroConf
Search for a maximum of ms ms for services of the specified type. If ms < 0 this method will wait forever

Specified by:
list in interface ZeroConf

startService

public void startService(ServiceContext context)
Description copied from interface: Service
Start the Service

Specified by:
startService in interface Service
Parameters:
context - the ServiceContext for this Service

stopService

public void stopService(ServiceContext context)
Description copied from interface: Service
Stop the Service

Specified by:
stopService in interface Service
Parameters:
context - the ServiceContext for this Service (same as was passed into start)

getContext

public ServiceContext getContext()
Description copied from interface: Service
Return the ServiceContext that was passed into Service.startService(org.qtunes.core.ServiceContext)

Specified by:
getContext in interface Service

reportState

public java.util.Map<java.lang.String,java.lang.Object> reportState()
Description copied from interface: Service
Return a Map describing the state of this Service, for serialization back to any client that needs to know (eg webplayer) - so values should be serializable objects, eg Lists, Maps or simple objects. If no useful state, return null.

Specified by:
reportState in interface Service