public class SMessage extends Object
Constructor and Description |
---|
SMessage(org.xbill.DNS.Header h)
Creates a instance of this class.
|
SMessage(int id,
org.xbill.DNS.Record question)
Creates a new instance of this class.
|
SMessage(org.xbill.DNS.Message m)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
SRRset |
findAnswerRRset(org.xbill.DNS.Name qname,
int qtype,
int qclass)
Find an "answer" RRset.
|
SRRset |
findRRset(org.xbill.DNS.Name name,
int type,
int dclass,
int section)
Find a specific (S)RRset in a given section.
|
String |
getBogusReason()
Gets the reason why this messages' status is bogus.
|
int |
getCount(int section)
Gets the number of records.
|
org.xbill.DNS.Header |
getHeader()
Gets the header of this message.
|
org.xbill.DNS.Message |
getMessage()
Gets this message as a standard DNSJAVA message.
|
org.xbill.DNS.Record |
getQuestion()
Gets the question section of this message.
|
int |
getRcode()
Gets the result code of the response message.
|
List<SRRset> |
getSectionRRsets(int section)
Gets signed RRsets for the queried section.
|
SRRset[] |
getSectionRRsets(int section,
int qtype)
Gets signed RRsets for the queried section.
|
SecurityStatus |
getStatus()
Gets the security status of this message.
|
void |
setBogus(String reason)
Sets the security status of this message to bogus and sets the reason.
|
void |
setStatus(SecurityStatus status)
Sets the security status for this message.
|
void |
setStatus(SecurityStatus status,
String reason)
Sets the security status for this message.
|
public SMessage(org.xbill.DNS.Header h)
h
- The header of the original message.public SMessage(int id, org.xbill.DNS.Record question)
id
- The ID of the DNS query or response message.question
- The question section of the query or response.public SMessage(org.xbill.DNS.Message m)
m
- The DNS message to wrap.public org.xbill.DNS.Header getHeader()
public org.xbill.DNS.Record getQuestion()
public List<SRRset> getSectionRRsets(int section)
section
- The section whose RRsets are demanded.public SRRset[] getSectionRRsets(int section, int qtype)
section
- The section whose RRsets are demanded.qtype
- Filter the results for these record types.public int getRcode()
public SecurityStatus getStatus()
public void setStatus(SecurityStatus status)
status
- the new security status for this message.public void setStatus(SecurityStatus status, String reason)
status
- the new security status for this message.reason
- Why this message's status is set as indicated.public String getBogusReason()
public void setBogus(String reason)
reason
- Why this message's status is bogus.public org.xbill.DNS.Message getMessage()
public int getCount(int section)
section
- The section for which the records are counted.public SRRset findRRset(org.xbill.DNS.Name name, int type, int dclass, int section)
name
- the name of the RRset.type
- the type of the RRset.dclass
- the class of the RRset.section
- the section to look in (ANSWER to ADDITIONAL)public SRRset findAnswerRRset(org.xbill.DNS.Name qname, int qtype, int qclass)
qname
- The starting search name.qtype
- The search type.qclass
- The search class.Copyright © 2016 jitsi.org. All rights reserved.