ietf
Class MxRecord

java.lang.Object
  extended by ietf.MxRecord

public class MxRecord
extends java.lang.Object

Represents a mail exchange (MX) record for a particular domain.


Constructor Summary
MxRecord(int preference, java.lang.String ipAddr)
          Creates a new instance of MxRecord and initializes member variables to the arguments received.
 
Method Summary
 void display()
          Displays the preference and IP address of this MX record.
 java.lang.String getIpAddress()
          Retrieves the IP address corresponding to this MX record as obtained from its A record.
 int getPref()
          Retrieves the preference of this mail exchange record.
 void setIpAddress(java.lang.String ipAddr)
          Sets the ipAddress of this MX record to the argument ipAddr.
 void setPref(int preference)
          Sets pref of this MX record to the preference argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MxRecord

public MxRecord(int preference,
                java.lang.String ipAddr)
Creates a new instance of MxRecord and initializes member variables to the arguments received.

Parameters:
preference - the preference of this MX record.
ipAddr - the IP address corresponding to this MX record.
Method Detail

getPref

public int getPref()
Retrieves the preference of this mail exchange record.

Returns:
the preference of this MX record.

getIpAddress

public java.lang.String getIpAddress()
Retrieves the IP address corresponding to this MX record as obtained from its A record.

Returns:
the IP address corresponding to this MX record.

setPref

public void setPref(int preference)
Sets pref of this MX record to the preference argument.

Parameters:
preference - the preference to assign to this MX record.

setIpAddress

public void setIpAddress(java.lang.String ipAddr)
Sets the ipAddress of this MX record to the argument ipAddr.

Parameters:
ipAddr - the IP address to assign to this MX record.

display

public void display()
Displays the preference and IP address of this MX record.