|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.protocols.dns.DNSAddressRR
Holds a DNS resource record which is a DNS response that gives the IP address of a particular hostname. A resource record typically has:
Element | Description |
Name | Domain name that the resource record describes. |
Type | Type of RR. |
Class | RR Class. |
TTL | Time-To-Live for the RR. |
RDLEN | Length of the following data. |
Data | Actual data of this RR. |
Field Summary | |
private int[] |
ipAddress
The IP Address for the Route Record. |
private int |
m_class
Class of this RR. |
private long |
m_created
Time at which this RR was created. |
private java.lang.String |
m_name
Name of this RR. |
private long |
m_TTL
Time to live for this RR. |
private int |
m_type
Type of this RR. |
Constructor Summary | |
DNSAddressRR(java.lang.String name,
int type,
int clas,
long ttl,
DNSInputStream dnsIn)
Constructs an new DNS Address Resource Record with the specified information. |
Method Summary | |
private java.lang.String |
AddressToByteString()
Returns the address in the dotted decimal format. |
byte[] |
getAddress()
Returns the address from the address record as a byte array. |
java.net.InetAddress |
getInetAddress()
the InetAddress of the address contained for the record. |
int |
getRRClass()
Returns the class of this RR. |
java.lang.String |
getRRName()
Returns the name of this RR. |
long |
getRRTTL()
Returns the TTL of this RR. |
int |
getRRType()
Returns the type of this RR. |
boolean |
isValid()
Returns true if still valid i.e. |
java.lang.String |
toString()
Converts the object to a textual string that describes the resource record. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String m_name
Name of this RR.
private int m_type
Type of this RR.
private int m_class
Class of this RR.
private long m_TTL
Time to live for this RR.
private long m_created
Time at which this RR was created.
private int[] ipAddress
The IP Address for the Route Record.
Constructor Detail |
public DNSAddressRR(java.lang.String name, int type, int clas, long ttl, DNSInputStream dnsIn) throws java.io.IOException
Constructs an new DNS Address Resource Record with the specified information.
name
- name of the RRtype
- type of the RRclas
- class of the RRttl
- time for which this RR is validdnsIn
- inputstream for this RR
java.io.IOException
- Thrown if an error occurs decoding data from the passed
DNSInputStream.Method Detail |
private java.lang.String AddressToByteString()
Returns the address in the dotted decimal format.
public byte[] getAddress()
Returns the address from the address record as a byte array.
public java.net.InetAddress getInetAddress() throws java.net.UnknownHostException
the InetAddress of the address contained for the record.
java.net.UnknownHostException
- Thrown if the InetAddress object cannot be constructed.public java.lang.String toString()
Converts the object to a textual string that describes the resource record.
public java.lang.String getRRName()
Returns the name of this RR.
public int getRRType()
Returns the type of this RR.
public int getRRClass()
Returns the class of this RR.
public long getRRTTL()
Returns the TTL of this RR.
public boolean isValid()
Returns true if still valid i.e. TTL has not expired.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |