org.apache.directory.server.dns.messages
Class DnsMessage

java.lang.Object
  extended by org.apache.directory.server.dns.messages.DnsMessage

public class DnsMessage
extends java.lang.Object

All communications inside of the domain protocol are carried in a single format called a message. The top level format of message is divided into 5 sections (some of which are empty in certain cases) shown below: +---------------------+ | Header | +---------------------+ | Question | the question for the name server +---------------------+ | Answer | ResourceRecords answering the question +---------------------+ | Authority | ResourceRecords pointing toward an authority +---------------------+ | Additional | ResourceRecords holding additional information +---------------------+

Version:
$Rev: 664295 $, $Date: 2008-06-07 09:48:16 +0200 (Sat, 07 Jun 2008) $
Author:
Apache Directory Project

Constructor Summary
DnsMessage(int transactionId, MessageType messageType, OpCode opCode, boolean authoritativeAnswer, boolean truncated, boolean recursionDesired, boolean recursionAvailable, boolean reserved, boolean acceptNonAuthenticatedData, ResponseCode responseCode, java.util.List<QuestionRecord> question, java.util.List<ResourceRecord> answer, java.util.List<ResourceRecord> authority, java.util.List<ResourceRecord> additional)
          Creates a new instance of DnsMessage.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.util.List<ResourceRecord> getAdditionalRecords()
           
 java.util.List<ResourceRecord> getAnswerRecords()
           
 java.util.List<ResourceRecord> getAuthorityRecords()
           
 MessageType getMessageType()
           
 OpCode getOpCode()
           
 java.util.List<QuestionRecord> getQuestionRecords()
           
 ResponseCode getResponseCode()
           
 int getTransactionId()
           
 int hashCode()
           
 boolean isAcceptNonAuthenticatedData()
           
 boolean isAuthoritativeAnswer()
           
 boolean isRecursionAvailable()
           
 boolean isRecursionDesired()
           
 boolean isReserved()
           
 boolean isTruncated()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DnsMessage

public DnsMessage(int transactionId,
                  MessageType messageType,
                  OpCode opCode,
                  boolean authoritativeAnswer,
                  boolean truncated,
                  boolean recursionDesired,
                  boolean recursionAvailable,
                  boolean reserved,
                  boolean acceptNonAuthenticatedData,
                  ResponseCode responseCode,
                  java.util.List<QuestionRecord> question,
                  java.util.List<ResourceRecord> answer,
                  java.util.List<ResourceRecord> authority,
                  java.util.List<ResourceRecord> additional)
Creates a new instance of DnsMessage.

Parameters:
transactionId -
messageType -
opCode -
authoritativeAnswer -
truncated -
recursionDesired -
recursionAvailable -
reserved -
acceptNonAuthenticatedData -
responseCode -
question -
answer -
authority -
additional -
Method Detail

isAcceptNonAuthenticatedData

public boolean isAcceptNonAuthenticatedData()
Returns:
Returns the acceptNonAuthenticatedData.

getAdditionalRecords

public java.util.List<ResourceRecord> getAdditionalRecords()
Returns:
Returns the additional.

getAnswerRecords

public java.util.List<ResourceRecord> getAnswerRecords()
Returns:
Returns the answers.

isAuthoritativeAnswer

public boolean isAuthoritativeAnswer()
Returns:
Returns the authoritativeAnswer.

getAuthorityRecords

public java.util.List<ResourceRecord> getAuthorityRecords()
Returns:
Returns the authority.

getMessageType

public MessageType getMessageType()
Returns:
Returns the messageType.

getOpCode

public OpCode getOpCode()
Returns:
Returns the opCode.

getQuestionRecords

public java.util.List<QuestionRecord> getQuestionRecords()
Returns:
Returns the question.

isRecursionAvailable

public boolean isRecursionAvailable()
Returns:
Returns the recursionAvailable.

isRecursionDesired

public boolean isRecursionDesired()
Returns:
Returns the recursionDesired.

isReserved

public boolean isReserved()
Returns:
Returns the reserved.

getResponseCode

public ResponseCode getResponseCode()
Returns:
Returns the responseCode.

getTransactionId

public int getTransactionId()
Returns:
Returns the transactionId.

isTruncated

public boolean isTruncated()
Returns:
Returns the truncated.

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
the instance's hash code
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.