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