|
JmDNS 3.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.jmdns.impl.JmmDNSImpl
public class JmmDNSImpl
This class enable multihomming mDNS. It will open a mDNS per IP address of the machine.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface javax.jmdns.JmmDNS |
---|
JmmDNS.Factory |
Constructor Summary | |
---|---|
JmmDNSImpl()
|
Method Summary | |
---|---|
void |
addNetworkTopologyListener(NetworkTopologyListener listener)
Listen to network changes. |
void |
addServiceListener(String type,
ServiceListener listener)
Listen for services of a given type. |
void |
addServiceTypeListener(ServiceTypeListener listener)
Listen for service types. |
void |
close()
|
String[] |
getHostNames()
Return the list HostName associated with this JmmDNS instance. |
InetAddress[] |
getInterfaces()
Return the list of addresses of the interface to which this instance of JmmDNS is bound. |
String[] |
getNames()
Return the names of the JmDNS instances. |
ServiceInfo[] |
getServiceInfos(String type,
String name)
Get service information. |
ServiceInfo[] |
getServiceInfos(String type,
String name,
boolean persistent)
Get service information. |
ServiceInfo[] |
getServiceInfos(String type,
String name,
boolean persistent,
long timeout)
Get service information. |
ServiceInfo[] |
getServiceInfos(String type,
String name,
long timeout)
Get service information. |
void |
inetAddressAdded(NetworkTopologyEvent event)
A network address has been added. |
void |
inetAddressRemoved(NetworkTopologyEvent event)
A network address has been removed. |
ServiceInfo[] |
list(String type)
Returns a list of service infos of the specified type. |
ServiceInfo[] |
list(String type,
long timeout)
Returns a list of service infos of the specified type. |
Map<String,ServiceInfo[]> |
listBySubtype(String type)
Returns a list of service infos of the specified type sorted by subtype. |
Map<String,ServiceInfo[]> |
listBySubtype(String type,
long timeout)
Returns a list of service infos of the specified type sorted by subtype. |
NetworkTopologyListener[] |
networkListeners()
Returns list of network change listeners |
void |
registerService(ServiceInfo info)
Register a service. |
void |
registerServiceType(String type)
Register a service type. |
void |
removeNetworkTopologyListener(NetworkTopologyListener listener)
Remove listener for network changes. |
void |
removeServiceListener(String type,
ServiceListener listener)
Remove listener for services of a given type. |
void |
removeServiceTypeListener(ServiceTypeListener listener)
Remove listener for service types. |
void |
requestServiceInfo(String type,
String name)
Request service information. |
void |
requestServiceInfo(String type,
String name,
boolean persistent)
Request service information. |
void |
requestServiceInfo(String type,
String name,
boolean persistent,
long timeout)
Request service information. |
void |
requestServiceInfo(String type,
String name,
long timeout)
Request service information. |
void |
textValueUpdated(ServiceInfo target,
byte[] value)
|
void |
unregisterAllServices()
Unregister all services. |
void |
unregisterService(ServiceInfo info)
Unregister a service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmmDNSImpl()
Method Detail |
---|
public void close() throws IOException
close
in interface Closeable
IOException
public String[] getNames()
JmmDNS
getNames
in interface JmmDNS
JmDNS.getName()
public String[] getHostNames()
JmmDNS
getHostNames
in interface JmmDNS
JmDNS.getHostName()
public InetAddress[] getInterfaces() throws IOException
JmmDNS
getInterfaces
in interface JmmDNS
IOException
JmDNS.getInterface()
public ServiceInfo[] getServiceInfos(String type, String name)
JmmDNS
getServiceInfos
in interface JmmDNS
type
- fully qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.
JmDNS.getServiceInfo(java.lang.String, java.lang.String)
public ServiceInfo[] getServiceInfos(String type, String name, long timeout)
JmmDNS
getServiceInfos
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.timeout
- timeout in milliseconds. Typical timeout should be 5s.
JmDNS.getServiceInfo(java.lang.String, java.lang.String, long)
public ServiceInfo[] getServiceInfos(String type, String name, boolean persistent)
JmmDNS
getServiceInfos
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.persistent
- if true
ServiceListener.resolveService will be called whenever new new information is received.
JmDNS.getServiceInfo(java.lang.String, java.lang.String, boolean)
public ServiceInfo[] getServiceInfos(String type, String name, boolean persistent, long timeout)
JmmDNS
getServiceInfos
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.persistent
- if true
ServiceListener.resolveService will be called whenever new new information is received.timeout
- timeout in milliseconds. Typical timeout should be 5s.
JmDNS.getServiceInfo(java.lang.String, java.lang.String, boolean, long)
public void requestServiceInfo(String type, String name)
JmmDNS
requestServiceInfo
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.JmDNS.requestServiceInfo(java.lang.String, java.lang.String)
public void requestServiceInfo(String type, String name, boolean persistent)
JmmDNS
requestServiceInfo
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.persistent
- if true
ServiceListener.resolveService will be called whenever new new information is received.JmDNS.requestServiceInfo(java.lang.String, java.lang.String, boolean)
public void requestServiceInfo(String type, String name, long timeout)
JmmDNS
requestServiceInfo
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.timeout
- timeout in millisecondsJmDNS.requestServiceInfo(java.lang.String, java.lang.String, long)
public void requestServiceInfo(String type, String name, boolean persistent, long timeout)
JmmDNS
requestServiceInfo
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.name
- unqualified service name, such as foobar
.persistent
- if true
ServiceListener.resolveService will be called whenever new new information is received.timeout
- timeout in millisecondsJmDNS.requestServiceInfo(java.lang.String, java.lang.String, boolean, long)
public void addServiceTypeListener(ServiceTypeListener listener) throws IOException
JmmDNS
addServiceTypeListener
in interface JmmDNS
listener
- listener for service types
IOException
JmDNS.addServiceTypeListener(javax.jmdns.ServiceTypeListener)
public void removeServiceTypeListener(ServiceTypeListener listener)
JmmDNS
removeServiceTypeListener
in interface JmmDNS
listener
- listener for service typesJmDNS.removeServiceTypeListener(javax.jmdns.ServiceTypeListener)
public void addServiceListener(String type, ServiceListener listener)
JmmDNS
_http._tcp.local.
.
addServiceListener
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.listener
- listener for service updatesJmDNS.addServiceListener(java.lang.String, javax.jmdns.ServiceListener)
public void removeServiceListener(String type, ServiceListener listener)
JmmDNS
removeServiceListener
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.listener
- listener for service updatesJmDNS.removeServiceListener(java.lang.String, javax.jmdns.ServiceListener)
public void textValueUpdated(ServiceInfo target, byte[] value)
textValueUpdated
in interface ServiceInfoImpl.Delegate
public void registerService(ServiceInfo info) throws IOException
JmmDNS
registerService
in interface JmmDNS
info
- service info to register
IOException
JmDNS.registerService(javax.jmdns.ServiceInfo)
public void unregisterService(ServiceInfo info)
JmmDNS
unregisterService
in interface JmmDNS
info
- service info to removeJmDNS.unregisterService(javax.jmdns.ServiceInfo)
public void unregisterAllServices()
JmmDNS
unregisterAllServices
in interface JmmDNS
JmDNS.unregisterAllServices()
public void registerServiceType(String type)
JmmDNS
registerServiceType
in interface JmmDNS
type
- full qualified service type, such as _http._tcp.local.
.JmDNS.registerServiceType(java.lang.String)
public ServiceInfo[] list(String type)
JmmDNS
list
in interface JmmDNS
type
- Service type name, such as _http._tcp.local.
.
JmDNS.list(java.lang.String)
public ServiceInfo[] list(String type, long timeout)
JmmDNS
list
in interface JmmDNS
type
- Service type name, such as _http._tcp.local.
.timeout
- timeout in milliseconds. Typical timeout should be 6s.
JmDNS.list(java.lang.String, long)
public Map<String,ServiceInfo[]> listBySubtype(String type)
JmmDNS
listBySubtype
in interface JmmDNS
type
- Service type name, such as _http._tcp.local.
.
JmDNS.listBySubtype(java.lang.String)
public Map<String,ServiceInfo[]> listBySubtype(String type, long timeout)
JmmDNS
listBySubtype
in interface JmmDNS
type
- Service type name, such as _http._tcp.local.
.timeout
- timeout in milliseconds. Typical timeout should be 6s.
JmDNS.listBySubtype(java.lang.String, long)
public void addNetworkTopologyListener(NetworkTopologyListener listener)
JmmDNS
addNetworkTopologyListener
in interface JmmDNS
listener
- listener for network changespublic void removeNetworkTopologyListener(NetworkTopologyListener listener)
JmmDNS
removeNetworkTopologyListener
in interface JmmDNS
listener
- listener for network changespublic NetworkTopologyListener[] networkListeners()
JmmDNS
networkListeners
in interface JmmDNS
public void inetAddressAdded(NetworkTopologyEvent event)
NetworkTopologyListener
inetAddressAdded
in interface NetworkTopologyListener
event
- The NetworkTopologyEvent providing the name and fully qualified type of the service.public void inetAddressRemoved(NetworkTopologyEvent event)
NetworkTopologyListener
inetAddressRemoved
in interface NetworkTopologyListener
event
- The NetworkTopologyEvent providing the name and fully qualified type of the service.
|
Last updated 2011-08-25 12:40 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |