create
public static ServiceInfo create(String type,
String name,
int port,
String text)
Construct a service description for registrating with JmDNS.
type
- fully qualified service type name, such as _http._tcp.local.
.name
- unqualified service instance name, such as foobar
port
- the local port on which the service runstext
- string describing the service
create
public static ServiceInfo create(String type,
String name,
int port,
int weight,
int priority,
Hashtable props)
Construct a service description for registrating with JmDNS. The properties hashtable must
map property names to either Strings or byte arrays describing the property values.
type
- fully qualified service type name, such as _http._tcp.local.
.name
- unqualified service instance name, such as foobar
port
- the local port on which the service runsweight
- weight of the servicepriority
- priority of the serviceprops
- properties describing the service
create
public static ServiceInfo create(String type,
String name,
int port,
int weight,
int priority,
String text)
Construct a service description for registrating with JmDNS.
type
- fully qualified service type name, such as _http._tcp.local.
.name
- unqualified service instance name, such as foobar
port
- the local port on which the service runsweight
- weight of the servicepriority
- priority of the servicetext
- string describing the service
create
public static ServiceInfo create(String type,
String name,
int port,
int weight,
int priority,
text[] )
Construct a service description for registrating with JmDNS.
type
- fully qualified service type name, such as _http._tcp.local.
.name
- unqualified service instance name, such as foobar
port
- the local port on which the service runsweight
- weight of the servicepriority
- priority of the service
getAddress
public abstract InetAddress getAddress()
getHostAddress
public abstract String getHostAddress()
Get the host address of the service (ie X.X.X.X).
getInetAddress
public abstract InetAddress getInetAddress()
Get the InetAddress of the service.
getName
public abstract String getName()
Unqualified service instance name, such as foobar
.
getNiceTextString
public abstract String getNiceTextString()
getPort
public abstract int getPort()
Get the port for the service.
getPriority
public abstract int getPriority()
Get the priority of the service.
getPropertyBytes
public abstract byte[] getPropertyBytes(String name)
Get a property of the service. This involves decoding the
text bytes into a property list. Returns null if the property
is not found or the text data could not be decoded correctly.
getPropertyNames
public abstract Enumeration getPropertyNames()
Enumeration of the property names.
getPropertyString
public abstract String getPropertyString(String name)
Get a property of the service. This involves decoding the
text bytes into a property list. Returns null if the property
is not found, the text data could not be decoded correctly, or
the resulting bytes are not a valid UTF8 string.
getQualifiedName
public abstract String getQualifiedName()
Fully qualified service name, such as foobar._http._tcp.local.
.
getServer
public abstract String getServer()
Get the name of the server.
getTextBytes
public abstract byte[] getTextBytes()
Get the text for the serivce as raw bytes.
getTextString
public abstract String getTextString()
Get the text for the service. This will interpret the text bytes
as a UTF8 encoded string. Will return null if the bytes are not
a valid UTF8 encoded string.
getType
public abstract String getType()
Fully qualified service type name, such as _http._tcp.local.
.
getURL
public abstract String getURL()
Get the URL for this service. An http URL is created by
combining the address, port, and path properties.
getURL
public abstract String getURL(String protocol)
Get the URL for this service. An URL is created by
combining the protocol, address, port, and path properties.
getWeight
public abstract int getWeight()
Get the weight of the service.