org.apache.directory.shared.ldap.codec
Class LdapDecoder

java.lang.Object
  extended by org.apache.directory.shared.ldap.codec.LdapDecoder
All Implemented Interfaces:
org.apache.mina.filter.codec.ProtocolDecoder

public class LdapDecoder
extends Object
implements org.apache.mina.filter.codec.ProtocolDecoder

The LdapDecoder decodes ASN.1 BER encoded PDUs.

Author:
Apache Directory Project

Constructor Summary
LdapDecoder()
          Creates an instance of a Ldap Decoder implementation.
 
Method Summary
 void decode(org.apache.mina.core.session.IoSession session, org.apache.mina.core.buffer.IoBuffer in, org.apache.mina.filter.codec.ProtocolDecoderOutput out)
           
 Object decode(Object lock, InputStream in)
          Decodes a PDU from an input stream into a Snickers compiler generated stub envelope.
 void dispose(org.apache.mina.core.session.IoSession session)
           
 void finishDecode(org.apache.mina.core.session.IoSession session, org.apache.mina.filter.codec.ProtocolDecoderOutput out)
           
 DecoderCallback getCallback()
          
 void setCallback(DecoderCallback cb)
          Set the callback to call when the PDU has been decoded
 void setLdapMessageContainer(LdapMessageContainer<MessageDecorator<? extends Message>> ldapMessageContainer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapDecoder

public LdapDecoder()
Creates an instance of a Ldap Decoder implementation.

Method Detail

decode

public Object decode(Object lock,
                     InputStream in)
              throws DecoderException
Decodes a PDU from an input stream into a Snickers compiler generated stub envelope.

Parameters:
lock - Lock object used to exclusively read from the input stream
in - The input stream to read and decode PDU bytes from
Returns:
return decoded stub
Throws:
DecoderException

setCallback

public void setCallback(DecoderCallback cb)
Set the callback to call when the PDU has been decoded

Parameters:
cb - The callback

getCallback

public DecoderCallback getCallback()


decode

public void decode(org.apache.mina.core.session.IoSession session,
                   org.apache.mina.core.buffer.IoBuffer in,
                   org.apache.mina.filter.codec.ProtocolDecoderOutput out)
            throws Exception
Specified by:
decode in interface org.apache.mina.filter.codec.ProtocolDecoder
Throws:
Exception

dispose

public void dispose(org.apache.mina.core.session.IoSession session)
             throws Exception
Specified by:
dispose in interface org.apache.mina.filter.codec.ProtocolDecoder
Throws:
Exception

finishDecode

public void finishDecode(org.apache.mina.core.session.IoSession session,
                         org.apache.mina.filter.codec.ProtocolDecoderOutput out)
                  throws Exception
Specified by:
finishDecode in interface org.apache.mina.filter.codec.ProtocolDecoder
Throws:
Exception

setLdapMessageContainer

public void setLdapMessageContainer(LdapMessageContainer<MessageDecorator<? extends Message>> ldapMessageContainer)
Parameters:
ldapMessageContainer - the ldapMessageContainer to set


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