public class ServiceInfo extends Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
NO_VALUE |
Constructor and Description |
---|
ServiceInfo(String type,
String name,
int port,
int weight,
int priority,
byte[] text)
Construct a service description for registrating with JmDNS.
|
ServiceInfo(String type,
String name,
int port,
int weight,
int priority,
Hashtable props)
Construct a service description for registrating with JmDNS.
|
ServiceInfo(String type,
String name,
int port,
int weight,
int priority,
String text)
Construct a service description for registrating with JmDNS.
|
ServiceInfo(String type,
String name,
int port,
String text)
Construct a service description for registrating with JmDNS.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
InetAddress |
getAddress() |
String |
getHostAddress()
Get the host address of the service (ie X.X.X.X).
|
InetAddress |
getInetAddress()
Get the InetAddress of the service.
|
String |
getName()
Unqualified service instance name, such as
foobar . |
String |
getNiceTextString() |
int |
getPort()
Get the port for the service.
|
int |
getPriority()
Get the priority of the service.
|
byte[] |
getPropertyBytes(String name)
Get a property of the service.
|
Enumeration |
getPropertyNames()
Enumeration of the property names.
|
String |
getPropertyString(String name)
Get a property of the service.
|
String |
getQualifiedName()
Fully qualified service name, such as
foobar._http._tcp.local. . |
String |
getServer()
Get the name of the server.
|
byte[] |
getTextBytes()
Get the text for the serivce as raw bytes.
|
String |
getTextString()
Get the text for the service.
|
String |
getType()
Fully qualified service type name, such as
_http._tcp.local. . |
String |
getURL()
Get the URL for this service.
|
String |
getURL(String protocol)
Get the URL for this service.
|
int |
getWeight()
Get the weight of the service.
|
int |
hashCode() |
String |
toString() |
void |
updateRecord(JmDNS jmdns,
long now,
org.apache.activemq.jmdns.DNSRecord rec)
JmDNS callback to update a DNS record.
|
public static final byte[] NO_VALUE
public ServiceInfo(String type, String name, int port, String text)
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 servicepublic ServiceInfo(String type, String name, int port, int weight, int priority, String text)
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 servicepublic ServiceInfo(String type, String name, int port, int weight, int priority, Hashtable props)
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 servicepublic ServiceInfo(String type, String name, int port, int weight, int priority, byte[] text)
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
- bytes describing the servicepublic String getQualifiedName()
foobar._http._tcp.local.
.public String getHostAddress()
public InetAddress getAddress()
public InetAddress getInetAddress()
public int getPort()
public int getPriority()
public int getWeight()
public byte[] getTextBytes()
public String getTextString()
public String getURL()
public String getURL(String protocol)
public byte[] getPropertyBytes(String name)
public String getPropertyString(String name)
public Enumeration getPropertyNames()
public void updateRecord(JmDNS jmdns, long now, org.apache.activemq.jmdns.DNSRecord rec)
public String getNiceTextString()
Copyright © 2005–2017. All rights reserved.