Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Package Functions | Private Attributes | Static Private Attributes
javax.jmdns.impl.DNSRecord Class Reference
Inheritance diagram for javax.jmdns.impl.DNSRecord:
Inheritance graph
[legend]

List of all members.

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)
ServiceInfo getServiceInfo ()
abstract ServiceInfo getServiceInfo (boolean persistent)
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 (DNSIncoming msg)
boolean suppressedBy (DNSRecord other)
abstract void write (MessageOutputStream out)

Private Attributes

long _created
InetAddress _source
int _ttl

Static Private Attributes

static Logger logger = Logger.getLogger(DNSRecord.class.getName())

Detailed Description

DNS record

Author:
Arthur van Hoff, Rick Blair, Werner Randelshofer, Pierre Frisch

Definition at line 32 of file DNSRecord.java.


Constructor & Destructor Documentation

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.


Member Function Documentation

abstract DNSOutgoing javax.jmdns.impl.DNSRecord.addAnswer ( JmDNSImpl  dns,
DNSIncoming  in,
InetAddress  addr,
int  port,
DNSOutgoing  out 
) throws IOException [package, pure virtual]
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.

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.

Creates and return a service event for this record.

Parameters:
dnsDNS serviced by this event
Returns:
service event

Implemented in javax.jmdns.impl.DNSRecord.HostInformation, javax.jmdns.impl.DNSRecord.Service, javax.jmdns.impl.DNSRecord.Text, javax.jmdns.impl.DNSRecord.Pointer, and javax.jmdns.impl.DNSRecord.Address.

Return a service information associated with that record if appropriate.

Returns:
service information

Definition at line 978 of file DNSRecord.java.

abstract ServiceInfo javax.jmdns.impl.DNSRecord.getServiceInfo ( boolean  persistent) [pure virtual]

Return a service information associated with that record if appropriate.

Parameters:
persistentif true ServiceListener.resolveService will be called whenever new new information is received.
Returns:
service information

Implemented in javax.jmdns.impl.DNSRecord.HostInformation, javax.jmdns.impl.DNSRecord.Service, javax.jmdns.impl.DNSRecord.Text, javax.jmdns.impl.DNSRecord.Pointer, javax.jmdns.impl.DNSRecord.Address, javax.jmdns.impl.DNSRecord.IPv6Address, and javax.jmdns.impl.DNSRecord.IPv4Address.

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.

Returns:
Returns true if a conflict with one of the services registered with JmDNS or with the hostname occured.

Implemented in javax.jmdns.impl.DNSRecord.HostInformation, javax.jmdns.impl.DNSRecord.Service, javax.jmdns.impl.DNSRecord.Text, javax.jmdns.impl.DNSRecord.Pointer, and javax.jmdns.impl.DNSRecord.Address.

abstract boolean javax.jmdns.impl.DNSRecord.handleResponse ( JmDNSImpl  dns) [package, pure virtual]

Handles a response represented by this record.

Returns:
Returns true if a conflict with one of the services registered with JmDNS or with the hostname occured.

Implemented in javax.jmdns.impl.DNSRecord.HostInformation, javax.jmdns.impl.DNSRecord.Service, javax.jmdns.impl.DNSRecord.Text, javax.jmdns.impl.DNSRecord.Pointer, and javax.jmdns.impl.DNSRecord.Address.

boolean javax.jmdns.impl.DNSRecord.isExpired ( long  now) [inline, virtual]

Check if the record is expired.

Parameters:
nowupdate date
Returns:
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.

Returns:
false if this record can have multiple values in the cache, true otherwise.

Implemented in javax.jmdns.impl.DNSRecord.HostInformation, javax.jmdns.impl.DNSRecord.Service, javax.jmdns.impl.DNSRecord.Text, javax.jmdns.impl.DNSRecord.Pointer, and javax.jmdns.impl.DNSRecord.Address.

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.

Parameters:
nowupdate date
Returns:
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]
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 ( DNSIncoming  msg) [inline, package]

True if this record is suppressed by the answers in a message.

Definition at line 94 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.

void javax.jmdns.impl.DNSRecord.toString ( StringBuilder  aLog) [inline, protected]
abstract void javax.jmdns.impl.DNSRecord.write ( MessageOutputStream  out) [package, pure virtual]

Member Data Documentation

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.

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.


The documentation for this class was generated from the following file:


zeroconf_jmdns_suite
Author(s): Daniel Stonier
autogenerated on Thu Aug 27 2015 15:50:27