All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Classes | Public Member Functions
javax.jmdns.JmmDNS Interface Reference
Inheritance diagram for javax.jmdns.JmmDNS:
Inheritance graph
[legend]

List of all members.

Classes

class  Factory

Public Member Functions

abstract void addNetworkTopologyListener (NetworkTopologyListener listener)
abstract void addServiceListener (String type, ServiceListener listener)
abstract void addServiceTypeListener (ServiceTypeListener listener) throws IOException
abstract String[] getHostNames ()
abstract InetAddress[] getInetAddresses () throws IOException
abstract InetAddress[] getInterfaces () throws IOException
abstract String[] getNames ()
abstract ServiceInfo[] getServiceInfos (String type, String name)
abstract ServiceInfo[] getServiceInfos (String type, String name, long timeout)
abstract ServiceInfo[] getServiceInfos (String type, String name, boolean persistent)
abstract ServiceInfo[] getServiceInfos (String type, String name, boolean persistent, long timeout)
abstract boolean isClosed ()
abstract ServiceInfo[] list (String type)
abstract ServiceInfo[] list (String type, long timeout)
abstract Map< String,
ServiceInfo[]> 
listBySubtype (String type)
abstract Map< String,
ServiceInfo[]> 
listBySubtype (String type, long timeout)
abstract NetworkTopologyListener[] networkListeners ()
abstract void registerService (ServiceInfo info) throws IOException
abstract void registerServiceType (String type)
abstract void removeNetworkTopologyListener (NetworkTopologyListener listener)
abstract void removeServiceListener (String type, ServiceListener listener)
abstract void removeServiceTypeListener (ServiceTypeListener listener)
abstract void requestServiceInfo (String type, String name)
abstract void requestServiceInfo (String type, String name, boolean persistent)
abstract void requestServiceInfo (String type, String name, long timeout)
abstract void requestServiceInfo (String type, String name, boolean persistent, long timeout)
abstract void unregisterAllServices ()
abstract void unregisterService (ServiceInfo info)

Detailed Description

Java Multihomed Multicast DNS Uses an underlying JmDNS instance for each InetAddress found on this computer.
This class will monitor network topology changes, and will create or destroy JmDNS instances as required. It is your responsibility to maintain services registration (hint: use a NetworkTopologyListener).
Most of this class methods have no notion of transaction: if an Exception is raised in the middle of execution, you may be in an incoherent state.

Note: This API is experimental and may change in the future please let us know what work and what does not work in you application.

Author:
Cédrik Lime, Pierre Frisch

Definition at line 27 of file JmmDNS.java.


Member Function Documentation

abstract void javax.jmdns.JmmDNS.addNetworkTopologyListener ( NetworkTopologyListener  listener) [pure virtual]

Listen to network changes.

Parameters:
listenerlistener for network changes

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.addServiceListener ( String  type,
ServiceListener  listener 
) [pure virtual]

Listen for services of a given type. The type has to be a fully qualified type name such as _http._tcp.local..

Parameters:
typefull qualified service type, such as _http._tcp.local..
listenerlistener for service updates
See also:
javax.jmdns.JmDNS::addServiceListener(java.lang.String, javax.jmdns.ServiceListener)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.addServiceTypeListener ( ServiceTypeListener  listener) throws IOException [pure virtual]

Listen for service types.

Parameters:
listenerlistener for service types
Exceptions:
IOException
See also:
javax.jmdns.JmDNS::addServiceTypeListener(javax.jmdns.ServiceTypeListener)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract String [] javax.jmdns.JmmDNS.getHostNames ( ) [pure virtual]

Return the list HostName associated with this JmmDNS instance.

Returns:
list of host names
See also:
javax.jmdns.JmDNS::getHostName()

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract InetAddress [] javax.jmdns.JmmDNS.getInetAddresses ( ) throws IOException [pure virtual]

Return the list of addresses of the interface to which this instance of JmmDNS is bound.

Returns:
list of Internet Address
Exceptions:
IOException
See also:
javax.jmdns.JmDNS::getInetAddress()

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract InetAddress [] javax.jmdns.JmmDNS.getInterfaces ( ) throws IOException [pure virtual]

Return the list of addresses of the interface to which this instance of JmmDNS is bound.

Returns:
list of Internet Address
Exceptions:
IOException
See also:
javax.jmdns.JmDNS::getInterface()
Deprecated:
do not use this implementation yields unpredictable results use getInetAddresses()

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract String [] javax.jmdns.JmmDNS.getNames ( ) [pure virtual]

Return the names of the JmDNS instances.

Returns:
list of name of the JmDNS
See also:
javax.jmdns.JmDNS::getName()

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract ServiceInfo [] javax.jmdns.JmmDNS.getServiceInfos ( String  type,
String  name 
) [pure virtual]

Get service information. If the information is not cached, the method will block until updated information is received on all DNS.

Usage note: Do not call this method from the AWT event dispatcher thread. You will make the user interface unresponsive.

Parameters:
typefully qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
Returns:
list of service info. If no service info is found the list is empty.
See also:
javax.jmdns.JmDNS::getServiceInfo(java.lang.String, java.lang.String)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract ServiceInfo [] javax.jmdns.JmmDNS.getServiceInfos ( String  type,
String  name,
long  timeout 
) [pure virtual]

Get service information. If the information is not cached, the method will block until updated information is received on all DNS.

Usage note: If you call this method from the AWT event dispatcher thread, use a small timeout, or you will make the user interface unresponsive.

Parameters:
typefull qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
timeouttimeout in milliseconds. Typical timeout should be 5s.
Returns:
list of service info. If no service info is found the list is empty.
See also:
javax.jmdns.JmDNS::getServiceInfo(java.lang.String, java.lang.String, long)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract ServiceInfo [] javax.jmdns.JmmDNS.getServiceInfos ( String  type,
String  name,
boolean  persistent 
) [pure virtual]

Get service information. If the information is not cached, the method will block until updated information is received on all DNS.

Usage note: If you call this method from the AWT event dispatcher thread, use a small timeout, or you will make the user interface unresponsive.

Parameters:
typefull qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
persistentif true ServiceListener.resolveService will be called whenever new new information is received.
Returns:
list of service info. If no service info is found the list is empty.
See also:
javax.jmdns.JmDNS::getServiceInfo(java.lang.String, java.lang.String, boolean)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract ServiceInfo [] javax.jmdns.JmmDNS.getServiceInfos ( String  type,
String  name,
boolean  persistent,
long  timeout 
) [pure virtual]

Get service information. If the information is not cached, the method will block until updated information is received on all DNS.

Usage note: If you call this method from the AWT event dispatcher thread, use a small timeout, or you will make the user interface unresponsive.

Parameters:
typefull qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
timeouttimeout in milliseconds. Typical timeout should be 5s.
persistentif true ServiceListener.resolveService will be called whenever new new information is received.
Returns:
list of service info. If no service info is found the list is empty.
See also:
javax.jmdns.JmDNS::getServiceInfo(java.lang.String, java.lang.String, boolean, long)
abstract boolean javax.jmdns.JmmDNS.isClosed ( ) [pure virtual]

Flag indicating if this object has been closed or not.

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract ServiceInfo [] javax.jmdns.JmmDNS.list ( String  type) [pure virtual]

Returns a list of service infos of the specified type.

Parameters:
typeService type name, such as _http._tcp.local..
Returns:
An array of service instance.
See also:
javax.jmdns.JmDNS::list(java.lang.String)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract ServiceInfo [] javax.jmdns.JmmDNS.list ( String  type,
long  timeout 
) [pure virtual]

Returns a list of service infos of the specified type.

Parameters:
typeService type name, such as _http._tcp.local..
timeouttimeout in milliseconds. Typical timeout should be 6s.
Returns:
An array of service instance.
See also:
javax.jmdns.JmDNS::list(java.lang.String, long)
abstract Map<String, ServiceInfo[]> javax.jmdns.JmmDNS.listBySubtype ( String  type) [pure virtual]

Returns a list of service infos of the specified type sorted by subtype. Any service that do not register a subtype is listed in the empty subtype section.

Parameters:
typeService type name, such as _http._tcp.local..
Returns:
A dictionary of service info by subtypes.
See also:
javax.jmdns.JmDNS::listBySubtype(java.lang.String)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract Map<String, ServiceInfo[]> javax.jmdns.JmmDNS.listBySubtype ( String  type,
long  timeout 
) [pure virtual]

Returns a list of service infos of the specified type sorted by subtype. Any service that do not register a subtype is listed in the empty subtype section.

Parameters:
typeService type name, such as _http._tcp.local..
timeouttimeout in milliseconds. Typical timeout should be 6s.
Returns:
A dictionary of service info by subtypes.
See also:
javax.jmdns.JmDNS::listBySubtype(java.lang.String, long)

Returns list of network change listeners

Returns:
list of network change listeners

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.registerService ( ServiceInfo  info) throws IOException [pure virtual]

Register a service. The service is registered for access by other jmdns clients. The name of the service may be changed to make it unique.
Note the Service info is cloned for each network interface.

Parameters:
infoservice info to register
Exceptions:
IOException
See also:
javax.jmdns.JmDNS::registerService(javax.jmdns.ServiceInfo)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.registerServiceType ( String  type) [pure virtual]

Register a service type. If this service type was not already known, all service listeners will be notified of the new service type. Service types are automatically registered as they are discovered.

Parameters:
typefull qualified service type, such as _http._tcp.local..
See also:
javax.jmdns.JmDNS::registerServiceType(java.lang.String)

Implemented in javax.jmdns.impl.JmmDNSImpl.

Remove listener for network changes.

Parameters:
listenerlistener for network changes

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.removeServiceListener ( String  type,
ServiceListener  listener 
) [pure virtual]

Remove listener for services of a given type.

Parameters:
typefull qualified service type, such as _http._tcp.local..
listenerlistener for service updates
See also:
javax.jmdns.JmDNS::removeServiceListener(java.lang.String, javax.jmdns.ServiceListener)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.removeServiceTypeListener ( ServiceTypeListener  listener) [pure virtual]

Remove listener for service types.

Parameters:
listenerlistener for service types
See also:
javax.jmdns.JmDNS::removeServiceTypeListener(javax.jmdns.ServiceTypeListener)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.requestServiceInfo ( String  type,
String  name 
) [pure virtual]

Request service information. The information about the service is requested and the ServiceListener.resolveService method is called as soon as it is available.

Parameters:
typefull qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
See also:
javax.jmdns.JmDNS::requestServiceInfo(java.lang.String, java.lang.String)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.requestServiceInfo ( String  type,
String  name,
boolean  persistent 
) [pure virtual]

Request service information. The information about the service is requested and the ServiceListener.resolveService method is called as soon as it is available.

Parameters:
typefull qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
persistentif true ServiceListener.resolveService will be called whenever new new information is received.
See also:
javax.jmdns.JmDNS::requestServiceInfo(java.lang.String, java.lang.String, boolean)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.requestServiceInfo ( String  type,
String  name,
long  timeout 
) [pure virtual]

Request service information. The information about the service is requested and the ServiceListener.resolveService method is called as soon as it is available.

Parameters:
typefull qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
timeouttimeout in milliseconds
See also:
javax.jmdns.JmDNS::requestServiceInfo(java.lang.String, java.lang.String, long)

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.requestServiceInfo ( String  type,
String  name,
boolean  persistent,
long  timeout 
) [pure virtual]

Request service information. The information about the service is requested and the ServiceListener.resolveService method is called as soon as it is available.

Parameters:
typefull qualified service type, such as _http._tcp.local. .
nameunqualified service name, such as foobar .
persistentif true ServiceListener.resolveService will be called whenever new new information is received.
timeouttimeout in milliseconds
See also:
javax.jmdns.JmDNS::requestServiceInfo(java.lang.String, java.lang.String, boolean, long)
abstract void javax.jmdns.JmmDNS.unregisterAllServices ( ) [pure virtual]

Unregister all services.

See also:
javax.jmdns.JmDNS::unregisterAllServices()

Implemented in javax.jmdns.impl.JmmDNSImpl.

abstract void javax.jmdns.JmmDNS.unregisterService ( ServiceInfo  info) [pure virtual]

Unregister a service. The service should have been registered.

Parameters:
infoservice info to remove
See also:
javax.jmdns.JmDNS::unregisterService(javax.jmdns.ServiceInfo)

Implemented in javax.jmdns.impl.JmmDNSImpl.


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


zeroconf_jmdns
Author(s): Daniel Stonier
autogenerated on Tue Nov 6 2012 14:18:58