SK.gnome.dwarf.utils.dns
Class Message

java.lang.Object
  extended bySK.gnome.dwarf.utils.dns.Message

public class Message
extends java.lang.Object

This class represents a DNS message.


Field Summary
static int E_FORMAT_ERROR
          Format error.
static int E_NAME_ERROR
          Name error.
static int E_NO_ERROR
          No error condition.
static int E_NOT_IMPLEMENTED
          Not implemented.
static int E_NOTAUTH
          A server status request.
static int E_NOTZONE
          A server status request.
static int E_NXRRSET
          A server status request.
static int E_REFUSED
          Refused.
static int E_SERVER_FAILURE
          Server failure.
static int E_YXDOMAIN
          A server status request.
static int E_YXRRSET
          A server status request.
static int Q_IQUERY
          An inverse query.
static int Q_QUERY
          A standard query.
static int Q_STATUS
          A server status request.
 
Constructor Summary
Message(Question question, boolean recursion)
          Creates a new Message.
 
Method Summary
 boolean getAA()
          Whether not this is a response from an authoritative server.
 java.util.List getAdditional()
          Returns a list of the resource records in the additional records section.
 java.util.List getAnswers()
          Returns a list of the resource records in the answer section.
 java.util.List getAuthoritative()
          Returns a list of the server resource records in the authority records section.
 int getId()
          Returns the message identifier.
 java.util.List getQuestions()
          Returns a list of the resource records in the question section.
 boolean getRA()
          Whether the recursive query support is available.
 int getRC()
          The response code.
 boolean getTC()
          Whether this message was truncated.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Q_QUERY

public static final int Q_QUERY
A standard query.

See Also:
Constant Field Values

Q_IQUERY

public static final int Q_IQUERY
An inverse query.

See Also:
Constant Field Values

Q_STATUS

public static final int Q_STATUS
A server status request.

See Also:
Constant Field Values

E_NO_ERROR

public static final int E_NO_ERROR
No error condition.

See Also:
Constant Field Values

E_FORMAT_ERROR

public static final int E_FORMAT_ERROR
Format error.

The name server was unable to interpret the query.

See Also:
Constant Field Values

E_SERVER_FAILURE

public static final int E_SERVER_FAILURE
Server failure.

The name server was unable to process this query due to a problem with the name server.

See Also:
Constant Field Values

E_NAME_ERROR

public static final int E_NAME_ERROR
Name error.

Meaningful only for responses from an authoritative name server, this code signifies that the domain name referenced in the query does not exist.

See Also:
Constant Field Values

E_NOT_IMPLEMENTED

public static final int E_NOT_IMPLEMENTED
Not implemented.

The name server does not support the requested kind of query.

See Also:
Constant Field Values

E_REFUSED

public static final int E_REFUSED
Refused.

The name server refuses to perform the specified operation for policy reasons. For example, a name server may not wish to provide the information to the particular requester, or a name server may not wish to perform a particular operation (e.g., zone transfer) for particular data.

See Also:
Constant Field Values

E_YXDOMAIN

public static final int E_YXDOMAIN
A server status request.

See Also:
Constant Field Values

E_YXRRSET

public static final int E_YXRRSET
A server status request.

See Also:
Constant Field Values

E_NXRRSET

public static final int E_NXRRSET
A server status request.

See Also:
Constant Field Values

E_NOTAUTH

public static final int E_NOTAUTH
A server status request.

See Also:
Constant Field Values

E_NOTZONE

public static final int E_NOTZONE
A server status request.

See Also:
Constant Field Values
Constructor Detail

Message

public Message(Question question,
               boolean recursion)
Creates a new Message.

Parameters:
question - the query resource record
recursion - whether the recursion is permitted
Method Detail

getId

public int getId()
Returns the message identifier.

Returns:
the indentifier

getAA

public boolean getAA()
Whether not this is a response from an authoritative server.

Returns:
the AA bit value

getTC

public boolean getTC()
Whether this message was truncated.

Returns:
the TC bit value

getRA

public boolean getRA()
Whether the recursive query support is available.

Returns:
the RA bit value

getRC

public int getRC()
The response code.

Returns:
the response code.

getQuestions

public java.util.List getQuestions()
Returns a list of the resource records in the question section.

The returned list elements are instances of the Resource class.

Returns:
the questions

getAnswers

public java.util.List getAnswers()
Returns a list of the resource records in the answer section.

The returned list elements are instances of the Resource class.

Returns:
the answers

getAuthoritative

public java.util.List getAuthoritative()
Returns a list of the server resource records in the authority records section.

The returned list elements are instances of the Resource class.

Returns:
the answers

getAdditional

public java.util.List getAdditional()
Returns a list of the resource records in the additional records section.

The returned list elements are instances of the Resource class.

Returns:
the additional resources

toString

public java.lang.String toString()


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.