Class LdapProtocolDecoder
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.protocol.mina.LdapProtocolDecoder
-
- All Implemented Interfaces:
org.apache.mina.filter.codec.ProtocolDecoder
public class LdapProtocolDecoder extends Object implements org.apache.mina.filter.codec.ProtocolDecoder
A LDAP message decoder. It is based on api-ldap decoder.- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerCODEC_LOGThe loggerprivate org.apache.directory.api.ldap.codec.api.LdapApiServiceldapApiServiceThe LDAP API Service instance
-
Constructor Summary
Constructors Constructor Description LdapProtocolDecoder(org.apache.directory.api.ldap.codec.api.LdapApiService ldapApiService)Creates a new instance of LdapProtocolEncoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddecode(ByteBuffer buffer, org.apache.directory.api.ldap.codec.api.LdapMessageContainer<org.apache.directory.api.ldap.model.message.AbstractMessage> messageContainer, List<org.apache.directory.api.ldap.model.message.Message> decodedMessages)Decode an incoming buffer into LDAP messages.voiddecode(org.apache.mina.core.session.IoSession session, org.apache.mina.core.buffer.IoBuffer in, org.apache.mina.filter.codec.ProtocolDecoderOutput out)voiddispose(org.apache.mina.core.session.IoSession session)voidfinishDecode(org.apache.mina.core.session.IoSession session, org.apache.mina.filter.codec.ProtocolDecoderOutput out)
-
-
-
Method Detail
-
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:
decodein interfaceorg.apache.mina.filter.codec.ProtocolDecoder- Throws:
Exception
-
decode
private void decode(ByteBuffer buffer, org.apache.directory.api.ldap.codec.api.LdapMessageContainer<org.apache.directory.api.ldap.model.message.AbstractMessage> messageContainer, List<org.apache.directory.api.ldap.model.message.Message> decodedMessages) throws org.apache.directory.api.asn1.DecoderException
Decode an incoming buffer into LDAP messages. The result can be 0, 1 or many LDAP messages, which will be stored into the array the caller has created.- Parameters:
buffer- The incoming byte buffermessageContainer- The LdapMessageContainer which will be used to store the message being decoded. If the message is not fully decoded, the ucrrent state is stored into this containerdecodedMessages- The list of decoded messages- Throws:
org.apache.directory.api.asn1.DecoderException- If the decoding failed
-
finishDecode
public void finishDecode(org.apache.mina.core.session.IoSession session, org.apache.mina.filter.codec.ProtocolDecoderOutput out) throws Exception- Specified by:
finishDecodein interfaceorg.apache.mina.filter.codec.ProtocolDecoder- Throws:
Exception
-
-