javax.jmdns.impl

Class ServiceInfoImpl

Implemented Interfaces:
javax.jmdns.impl.DNSListener

public class ServiceInfoImpl
extends ServiceInfo
implements javax.jmdns.impl.DNSListener

JmDNS service information.

Field Summary

Fields inherited from class javax.jmdns.ServiceInfo

NO_VALUE

Constructor Summary

ServiceInfoImpl(String type, String name, int port, String text)
ServiceInfoImpl(String type, String name, int port, int weight, int priority, Hashtable props)
ServiceInfoImpl(String type, String name, int port, int weight, int priority, String text)
ServiceInfoImpl(String type, String name, int port, int weight, int priority, text[] )

Method Summary

void
addAnswers(DNSOutgoing out, int ttl, HostInfo localHost)
void
advanceState()
Sets the state and notifies all objects that wait on the ServiceInfo.
boolean
equals(Object obj)
InetAddress
getAddress()
JmDNSImpl
getDns()
String
getHostAddress()
InetAddress
getInetAddress()
String
getName()
String
getNiceTextString()
int
getPort()
int
getPriority()
byte[]
getPropertyBytes(String name)
Enumeration
getPropertyNames()
String
getPropertyString(String name)
String
getQualifiedName()
String
getServer()
DNSState
getState()
Returns the current state of this info.
TimerTask
getTask()
byte[]
getText()
byte[]
getTextBytes()
String
getTextString()
String
getType()
String
getURL()
String
getURL(String protocol)
int
getWeight()
boolean
hasData()
Returns true if the service info is filled with data.
int
hashCode()
void
setDns(JmDNSImpl dns)
void
setTask(TimerTask task)
void
setText(byte[] text)
String
toString()
void
updateRecord(JmDNSImpl jmdns, long now, DNSRecord rec)
JmDNS callback to update a DNS record.

Methods inherited from class javax.jmdns.ServiceInfo

create, create, create, create, getAddress, getHostAddress, getInetAddress, getName, getNiceTextString, getPort, getPriority, getPropertyBytes, getPropertyNames, getPropertyString, getQualifiedName, getServer, getTextBytes, getTextString, getType, getURL, getURL, getWeight

Constructor Details

ServiceInfoImpl

public ServiceInfoImpl(String type,
                       String name,
                       int port,
                       String text)

ServiceInfoImpl

public ServiceInfoImpl(String type,
                       String name,
                       int port,
                       int weight,
                       int priority,
                       Hashtable props)

ServiceInfoImpl

public ServiceInfoImpl(String type,
                       String name,
                       int port,
                       int weight,
                       int priority,
                       String text)

ServiceInfoImpl

public ServiceInfoImpl(String type,
                       String name,
                       int port,
                       int weight,
                       int priority,
                       text[] )
See Also:
javax.jmdns.ServiceInfo.create(String, String, int, int, int, byte[])

Method Details

addAnswers

public void addAnswers(DNSOutgoing out,
                       int ttl,
                       HostInfo localHost)
            throws IOException

advanceState

public void advanceState()
Sets the state and notifies all objects that wait on the ServiceInfo.

equals

public boolean equals(Object obj)

getAddress

public InetAddress getAddress()
Overrides:
getAddress in interface ServiceInfo

getDns

public JmDNSImpl getDns()

getHostAddress

public String getHostAddress()
Overrides:
getHostAddress in interface ServiceInfo

getInetAddress

public InetAddress getInetAddress()
Overrides:
getInetAddress in interface ServiceInfo

getName

public String getName()
Overrides:
getName in interface ServiceInfo

getNiceTextString

public String getNiceTextString()
Overrides:
getNiceTextString in interface ServiceInfo

getPort

public int getPort()
Overrides:
getPort in interface ServiceInfo

getPriority

public int getPriority()
Overrides:
getPriority in interface ServiceInfo

getPropertyBytes

public byte[] getPropertyBytes(String name)
Overrides:
getPropertyBytes in interface ServiceInfo
See Also:
javax.jmdns.ServiceInfo.getPropertyBytes(java.lang.String)

getPropertyNames

public Enumeration getPropertyNames()
Overrides:
getPropertyNames in interface ServiceInfo

getPropertyString

public String getPropertyString(String name)
Overrides:
getPropertyString in interface ServiceInfo
See Also:
javax.jmdns.ServiceInfo.getPropertyString(java.lang.String)

getQualifiedName

public String getQualifiedName()
Overrides:
getQualifiedName in interface ServiceInfo

getServer

public String getServer()
Overrides:
getServer in interface ServiceInfo

getState

public DNSState getState()
Returns the current state of this info.

getTask

public TimerTask getTask()

getText

public byte[] getText()

getTextBytes

public byte[] getTextBytes()
Overrides:
getTextBytes in interface ServiceInfo

getTextString

public String getTextString()
Overrides:
getTextString in interface ServiceInfo

getType

public String getType()
Overrides:
getType in interface ServiceInfo

getURL

public String getURL()
Overrides:
getURL in interface ServiceInfo

getURL

public String getURL(String protocol)
Overrides:
getURL in interface ServiceInfo
See Also:
javax.jmdns.ServiceInfo.getURL(java.lang.String)

getWeight

public int getWeight()
Overrides:
getWeight in interface ServiceInfo

hasData

public boolean hasData()
Returns true if the service info is filled with data.

hashCode

public int hashCode()

setDns

public void setDns(JmDNSImpl dns)

setTask

public void setTask(TimerTask task)

setText

public void setText(byte[] text)

toString

public String toString()

updateRecord

public void updateRecord(JmDNSImpl jmdns,
                         long now,
                         DNSRecord rec)
JmDNS callback to update a DNS record.
Specified by:
updateRecord in interface javax.jmdns.impl.DNSListener