SK.gnome.dwarf.utils.dns
Class MXResource

java.lang.Object
  extended bySK.gnome.dwarf.utils.dns.Record
      extended bySK.gnome.dwarf.utils.dns.Resource
          extended bySK.gnome.dwarf.utils.dns.MXResource
All Implemented Interfaces:
java.lang.Comparable

public class MXResource
extends Resource
implements java.lang.Comparable

This resource identifies a mail exchange for the domain.

Since this class implements the java.lang.Comparable interface, it can be used easily to create a sorted list of MX records.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.utils.dns.Resource
rdata, ttl
 
Fields inherited from class SK.gnome.dwarf.utils.dns.Record
clazz, name, type
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String getExchange()
          Returns the mail exhange hostname.
 int getPreference()
          Returns the preference number of this MX host.
 java.lang.String toString()
           
 
Methods inherited from class SK.gnome.dwarf.utils.dns.Resource
getRData, getTTL
 
Methods inherited from class SK.gnome.dwarf.utils.dns.Record
getClassString, getClazz, getName, getType, getTypeString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getPreference

public int getPreference()
Returns the preference number of this MX host.

Returns:
the preference number

getExchange

public java.lang.String getExchange()
Returns the mail exhange hostname.

Returns:
the MX hostname

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class Record


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