org.apache.directory.server.dns.protocol
Class DnsTcpDecoder

java.lang.Object
  extended by org.apache.mina.filter.codec.ProtocolDecoderAdapter
      extended by org.apache.mina.filter.codec.CumulativeProtocolDecoder
          extended by org.apache.directory.server.dns.protocol.DnsTcpDecoder
All Implemented Interfaces:
org.apache.mina.filter.codec.ProtocolDecoder

public class DnsTcpDecoder
extends org.apache.mina.filter.codec.CumulativeProtocolDecoder

A CumulativeProtocolDecoder which supports DNS operation over TCP, by reassembling split packets prior to decoding.

Version:
$Rev: 545041 $, $Date: 2007-06-06 20:31:34 -0700 (Wed, 06 Jun 2007) $
Author:
Apache Directory Project

Constructor Summary
DnsTcpDecoder()
           
 
Method Summary
protected  boolean doDecode(org.apache.mina.common.IoSession session, org.apache.mina.common.ByteBuffer in, org.apache.mina.filter.codec.ProtocolDecoderOutput out)
           
 int getMaxObjectSize()
          Returns the allowed maximum size of the object to be decoded.
 void setMaxObjectSize(int maxObjectSize)
          Sets the allowed maximum size of the object to be decoded.
 
Methods inherited from class org.apache.mina.filter.codec.CumulativeProtocolDecoder
decode, dispose
 
Methods inherited from class org.apache.mina.filter.codec.ProtocolDecoderAdapter
finishDecode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DnsTcpDecoder

public DnsTcpDecoder()
Method Detail

getMaxObjectSize

public int getMaxObjectSize()
Returns the allowed maximum size of the object to be decoded. If the size of the object to be decoded exceeds this value, this decoder will throw a BufferDataException. The default value is 16384 (16KB).

Returns:
The max object size.

setMaxObjectSize

public void setMaxObjectSize(int maxObjectSize)
Sets the allowed maximum size of the object to be decoded. If the size of the object to be decoded exceeds this value, this decoder will throw a BufferDataException. The default value is 16384 (16KB).

Parameters:
maxObjectSize -

doDecode

protected boolean doDecode(org.apache.mina.common.IoSession session,
                           org.apache.mina.common.ByteBuffer in,
                           org.apache.mina.filter.codec.ProtocolDecoderOutput out)
                    throws java.lang.Exception
Specified by:
doDecode in class org.apache.mina.filter.codec.CumulativeProtocolDecoder
Throws:
java.lang.Exception


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