|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.zeroconf.jmdns.ServiceInfo
public class ServiceInfo
JmDNS service information.
| Field Summary | |
|---|---|
(package private) InetAddress |
addr
|
(package private) JmDNS |
dns
|
static byte[] |
NO_VALUE
|
(package private) int |
port
|
(package private) int |
priority
|
(package private) String |
server
|
(package private) TimerTask |
task
Task associated to this service info. |
(package private) byte[] |
text
|
(package private) String |
type
|
(package private) int |
weight
|
| Constructor Summary | |
|---|---|
ServiceInfo(ServiceInfo info)
During recovery we need to duplicate service info to reregister them |
|
ServiceInfo(String type,
String name)
Construct a service record during service discovery. |
|
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,
Map<String,Object> 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. |
|
| Method Summary | |
|---|---|
(package private) void |
advanceState()
Sets the state and notifies all objects that wait on the ServiceInfo. |
(package private) void |
cancel()
Sets the state and notifies all objects that wait on the ServiceInfo. |
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. |
(package private) Map<String,Object> |
getProperties()
|
byte[] |
getPropertyBytes(String name)
Get a property of the service. |
Iterator<String> |
getPropertyNames()
Iterator |
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. |
(package private) DNSState |
getState()
Returns the current state of this info. |
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. |
(package private) boolean |
hasData()
Returns true if the service info is filled with data. |
int |
hashCode()
|
(package private) String |
readUTF(byte[] data,
int off,
int len)
Read data bytes as a UTF stream. |
(package private) void |
revertState()
Sets the state and notifies all objects that wait on the ServiceInfo. |
(package private) void |
setName(String name)
Sets the service instance name. |
void |
setProps(Map<String,Object> props)
SC-Bonjour Implementation: Method used to set the properties of an existing ServiceInfo. |
String |
toString()
|
void |
updateRecord(JmDNS jmdns,
long now,
DNSRecord rec)
JmDNS callback to update a DNS record. |
(package private) void |
writeUTF(OutputStream out,
String str)
Write a UTF string with a length to a stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte[] NO_VALUE
JmDNS dns
TimerTask task
String type
String server
int port
int weight
int priority
byte[] text
InetAddress addr
| Constructor Detail |
|---|
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 foobarport - the local port on which the service runstext - string describing the service
public 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 foobarport - the local port on which the service runsweight - weight of the servicepriority - priority of the servicetext - string describing the service
public ServiceInfo(String type,
String name,
int port,
int weight,
int priority,
Map<String,Object> props)
type - fully qualified service type name, such as _http._tcp.local..name - unqualified service instance name, such as foobarport - the local port on which the service runsweight - weight of the servicepriority - priority of the serviceprops - properties describing the service
public 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 foobarport - the local port on which the service runsweight - weight of the servicepriority - priority of the servicetext - bytes describing the service
ServiceInfo(String type,
String name)
ServiceInfo(ServiceInfo info)
| Method Detail |
|---|
public String getType()
_http._tcp.local. .
public String getName()
foobar .
void setName(String name)
name - unqualified service instance name,
such as foobarpublic String getQualifiedName()
foobar._http._tcp.local. .
public String getServer()
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)
protocol -
public byte[] getPropertyBytes(String name)
name -
public String getPropertyString(String name)
name -
public Iterator<String> getPropertyNames()
void writeUTF(OutputStream out,
String str)
throws IOException
IOException
String readUTF(byte[] data,
int off,
int len)
Map<String,Object> getProperties()
public void updateRecord(JmDNS jmdns,
long now,
DNSRecord rec)
updateRecord in interface DNSListenerrec - boolean hasData()
void advanceState()
void revertState()
void cancel()
DNSState getState()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String getNiceTextString()
public String toString()
toString in class Objectpublic void setProps(Map<String,Object> props)
props - Hashtable containing all the new properties to set
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||