$search
Classes | |
class | Address |
class | HostInformation |
class | IPv4Address |
class | IPv6Address |
class | Pointer |
class | Service |
class | Text |
Public Member Functions | |
boolean | equals (Object other) |
InetAddress | getRecordSource () |
abstract ServiceEvent | getServiceEvent (JmDNSImpl dns) |
abstract ServiceInfo | getServiceInfo (boolean persistent) |
ServiceInfo | getServiceInfo () |
int | getTTL () |
boolean | isExpired (long now) |
abstract boolean | isSingleValued () |
boolean | isStale (long now) |
void | setRecordSource (InetAddress source) |
void | setTTL (int ttl) |
Static Public Attributes | |
static final byte[] | EMPTY_TXT = new byte[] { 0 } |
Protected Member Functions | |
void | toString (StringBuilder aLog) |
Package Functions | |
abstract DNSOutgoing | addAnswer (JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException |
DNSRecord (String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique, int ttl) | |
long | getExpirationTime (int percent) |
int | getRemainingTTL (long now) |
abstract boolean | handleQuery (JmDNSImpl dns, long expirationTime) |
abstract boolean | handleResponse (JmDNSImpl dns) |
void | resetTTL (DNSRecord other) |
boolean | sameType (DNSRecord other) |
abstract boolean | sameValue (DNSRecord other) |
void | setWillExpireSoon (long now) |
boolean | suppressedBy (DNSRecord other) |
boolean | suppressedBy (DNSIncoming msg) |
abstract void | write (MessageOutputStream out) |
Private Attributes | |
long | _created |
InetAddress | _source |
int | _ttl |
Static Private Attributes | |
static Logger | logger = Logger.getLogger(DNSRecord.class.getName()) |
DNS record
Definition at line 32 of file DNSRecord.java.
javax::jmdns::impl::DNSRecord::DNSRecord | ( | String | name, | |
DNSRecordType | type, | |||
DNSRecordClass | recordClass, | |||
boolean | unique, | |||
int | ttl | |||
) | [inline, package] |
Create a DNSRecord with a name, type, class, and ttl.
Definition at line 45 of file DNSRecord.java.
abstract DNSOutgoing javax::jmdns::impl::DNSRecord::addAnswer | ( | JmDNSImpl | dns, | |
DNSIncoming | in, | |||
InetAddress | addr, | |||
int | port, | |||
DNSOutgoing | out | |||
) | throws IOException [package, pure virtual] |
Adds this as an answer to the provided outgoing datagram.
Implemented in javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
boolean javax::jmdns::impl::DNSRecord::equals | ( | Object | other | ) | [inline] |
Reimplemented from javax::jmdns::impl::DNSEntry.
Definition at line 56 of file DNSRecord.java.
long javax::jmdns::impl::DNSRecord::getExpirationTime | ( | int | percent | ) | [inline, package] |
Get the expiration time of this record.
Definition at line 122 of file DNSRecord.java.
InetAddress javax::jmdns::impl::DNSRecord::getRecordSource | ( | ) | [inline] |
Definition at line 1004 of file DNSRecord.java.
int javax::jmdns::impl::DNSRecord::getRemainingTTL | ( | long | now | ) | [inline, package] |
Get the remaining TTL for this record.
Definition at line 130 of file DNSRecord.java.
abstract ServiceEvent javax::jmdns::impl::DNSRecord::getServiceEvent | ( | JmDNSImpl | dns | ) | [pure virtual] |
Creates and return a service event for this record.
dns | DNS serviced by this event |
Implemented in javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
abstract ServiceInfo javax::jmdns::impl::DNSRecord::getServiceInfo | ( | boolean | persistent | ) | [pure virtual] |
Return a service information associated with that record if appropriate.
persistent | if true ServiceListener.resolveService will be called whenever new new information is received. |
Implemented in javax::jmdns::impl::DNSRecord::IPv4Address, javax::jmdns::impl::DNSRecord::IPv6Address, javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
ServiceInfo javax::jmdns::impl::DNSRecord::getServiceInfo | ( | ) | [inline] |
Return a service information associated with that record if appropriate.
Definition at line 978 of file DNSRecord.java.
int javax::jmdns::impl::DNSRecord::getTTL | ( | ) | [inline] |
Definition at line 1022 of file DNSRecord.java.
abstract boolean javax::jmdns::impl::DNSRecord::handleQuery | ( | JmDNSImpl | dns, | |
long | expirationTime | |||
) | [package, pure virtual] |
Handles a query represented by this record.
Implemented in javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
abstract boolean javax::jmdns::impl::DNSRecord::handleResponse | ( | JmDNSImpl | dns | ) | [package, pure virtual] |
Handles a response represented by this record.
Implemented in javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
boolean javax::jmdns::impl::DNSRecord::isExpired | ( | long | now | ) | [inline, virtual] |
Check if the record is expired.
now | update date |
true
is the record is expired, false
otherwise. Implements javax::jmdns::impl::DNSEntry.
Definition at line 139 of file DNSRecord.java.
abstract boolean javax::jmdns::impl::DNSRecord::isSingleValued | ( | ) | [pure virtual] |
Determine if a record can have multiple values in the cache.
false
if this record can have multiple values in the cache, true
otherwise. Implemented in javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
boolean javax::jmdns::impl::DNSRecord::isStale | ( | long | now | ) | [inline, virtual] |
Check if the record is stale, i.e. it has outlived more than half of its TTL.
now | update date |
true
is the record is stale, false
otherwise. Implements javax::jmdns::impl::DNSEntry.
Definition at line 148 of file DNSRecord.java.
void javax::jmdns::impl::DNSRecord::resetTTL | ( | DNSRecord | other | ) | [inline, package] |
Reset the TTL of a record. This avoids having to update the entire record in the cache.
Definition at line 155 of file DNSRecord.java.
boolean javax::jmdns::impl::DNSRecord::sameType | ( | DNSRecord | other | ) | [inline, package] |
True if this record has the same type as some other record.
Definition at line 68 of file DNSRecord.java.
abstract boolean javax::jmdns::impl::DNSRecord::sameValue | ( | DNSRecord | other | ) | [package, pure virtual] |
True if this record has the same value as some other record.
Implemented in javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
void javax::jmdns::impl::DNSRecord::setRecordSource | ( | InetAddress | source | ) | [inline] |
Definition at line 1000 of file DNSRecord.java.
void javax::jmdns::impl::DNSRecord::setTTL | ( | int | ttl | ) | [inline] |
Definition at line 1018 of file DNSRecord.java.
void javax::jmdns::impl::DNSRecord::setWillExpireSoon | ( | long | now | ) | [inline, package] |
When a record flushed we don't remove it immediately, but mark it for rapid decay.
Definition at line 163 of file DNSRecord.java.
boolean javax::jmdns::impl::DNSRecord::suppressedBy | ( | DNSRecord | other | ) | [inline, package] |
True if this record would be suppressed by an answer. This is the case if this record would not have a significantly longer TTL.
Definition at line 112 of file DNSRecord.java.
boolean javax::jmdns::impl::DNSRecord::suppressedBy | ( | DNSIncoming | msg | ) | [inline, package] |
True if this record is suppressed by the answers in a message.
Definition at line 94 of file DNSRecord.java.
void javax::jmdns::impl::DNSRecord::toString | ( | StringBuilder | aLog | ) | [inline, protected] |
aLog |
Reimplemented from javax::jmdns::impl::DNSEntry.
Reimplemented in javax::jmdns::impl::DNSRecord::Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
Definition at line 1013 of file DNSRecord.java.
abstract void javax::jmdns::impl::DNSRecord::write | ( | MessageOutputStream | out | ) | [package, pure virtual] |
Write this record into an outgoing message.
Implemented in javax::jmdns::impl::DNSRecord::IPv4Address, javax::jmdns::impl::DNSRecord::IPv6Address, javax::jmdns::impl::DNSRecord::Pointer, javax::jmdns::impl::DNSRecord::Text, javax::jmdns::impl::DNSRecord::Service, and javax::jmdns::impl::DNSRecord::HostInformation.
long javax::jmdns::impl::DNSRecord::_created [private] |
Definition at line 35 of file DNSRecord.java.
InetAddress javax::jmdns::impl::DNSRecord::_source [private] |
This source is mainly for debugging purposes, should be the address that sent this record.
Definition at line 40 of file DNSRecord.java.
int javax::jmdns::impl::DNSRecord::_ttl [private] |
Definition at line 34 of file DNSRecord.java.
final byte [] javax::jmdns::impl::DNSRecord::EMPTY_TXT = new byte[] { 0 } [static] |
Definition at line 534 of file DNSRecord.java.
Logger javax::jmdns::impl::DNSRecord::logger = Logger.getLogger(DNSRecord.class.getName()) [static, private] |
Definition at line 33 of file DNSRecord.java.