org.apache.directory.server.dns.io.decoder
Class MailExchangeRecordDecoder

java.lang.Object
  extended by org.apache.directory.server.dns.io.decoder.MailExchangeRecordDecoder
All Implemented Interfaces:
RecordDecoder

public class MailExchangeRecordDecoder
extends java.lang.Object
implements RecordDecoder

A decoder for MX records. MX records are encoded as per RFC-1035:

   3.3.9. MX RDATA format

     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
     |                  PREFERENCE                   |
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
     /                   EXCHANGE                    /
     /                                               /
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

   where:

   PREFERENCE
     A 16 bit integer which specifies the preference given to this RR among 
     others at the same owner. Lower values are preferred. 
     
   EXCHANGE
     A  which specifies a host willing to act as a mail exchange
     for the owner name.
 

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
MailExchangeRecordDecoder()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> decode(org.apache.mina.core.buffer.IoBuffer byteBuffer, short length)
          Decodes the given length of resource record data into attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailExchangeRecordDecoder

public MailExchangeRecordDecoder()
Method Detail

decode

public java.util.Map<java.lang.String,java.lang.Object> decode(org.apache.mina.core.buffer.IoBuffer byteBuffer,
                                                               short length)
                                                        throws java.io.IOException
Description copied from interface: RecordDecoder
Decodes the given length of resource record data into attributes. The type and number of attributes depends on the type of the resource record.

Specified by:
decode in interface RecordDecoder
Returns:
The map of attributes.
Throws:
java.io.IOException


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.