Class MX

  • All Implemented Interfaces:
    Data

    public class MX
    extends java.lang.Object
    implements Data
    MX record payload (mail service pointer).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String name
      The target server.
      protected int priority
      The priority of this service.
    • Constructor Summary

      Constructors 
      Constructor Description
      MX()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      The name of the target server.
      int getPriority()
      The priority of this service.
      Record.TYPE getType()
      The payload type.
      void parse​(java.io.DataInputStream dis, byte[] data, int length)
      Parse this payload.
      void setName​(java.lang.String name)
      Set the name of the target server.
      void setPriority​(int priority)
      Set the priority of this service entry.
      byte[] toByteArray()
      Binary representation of this payload.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • priority

        protected int priority
        The priority of this service.
      • name

        protected java.lang.String name
        The target server.
    • Constructor Detail

      • MX

        public MX()
    • Method Detail

      • getPriority

        public int getPriority()
        The priority of this service. Lower values mean higher priority.
        Returns:
        The priority.
      • setPriority

        public void setPriority​(int priority)
        Set the priority of this service entry. Lower values have higher priority.
        Parameters:
        priority - The new priority.
      • getName

        public java.lang.String getName()
        The name of the target server.
        Returns:
        The target servers name.
      • setName

        public void setName​(java.lang.String name)
        Set the name of the target server.
        Parameters:
        name - The new target servers name.
      • toByteArray

        public byte[] toByteArray()
        Description copied from interface: Data
        Binary representation of this payload.
        Specified by:
        toByteArray in interface Data
        Returns:
        The binary representation of this payload.
      • parse

        public void parse​(java.io.DataInputStream dis,
                          byte[] data,
                          int length)
                   throws java.io.IOException
        Description copied from interface: Data
        Parse this payload.
        Specified by:
        parse in interface Data
        Parameters:
        dis - The input stream.
        data - The plain data (needed for name cross references).
        length - The payload length.
        Throws:
        java.io.IOException - on io error (read past paket boundary).
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getType

        public Record.TYPE getType()
        Description copied from interface: Data
        The payload type.
        Specified by:
        getType in interface Data
        Returns:
        The payload type.