public class LdapDecoder extends Object implements ProviderDecoder
Constructor and Description |
---|
LdapDecoder(Provider provider,
BinaryAttributeDetector binaryAttributeDetector,
int maxPDUSize)
Creates an instance of a Ldap Decoder implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(Object encoded)
Decodes a PDU
|
Object |
decode(Object lock,
InputStream in)
Decodes a PDU from an input stream into a Snickers compiler generated
stub envelope.
|
Provider |
getProvider()
Gets the Provider that this Decoder implementation is part of.
|
void |
setCallback(DecoderCallback cb)
Set the callback to call when the PDU has been decoded
|
void |
setDecoderMonitor(DecoderMonitor monitor)
Deprecated.
|
public LdapDecoder(Provider provider, BinaryAttributeDetector binaryAttributeDetector, int maxPDUSize)
provider
- the owning provider.binaryAttributeDetector
- checks for binary attributesmaxPDUSize
- the maximum size a PDU can bepublic void decode(Object encoded) throws DecoderException
decode
in interface StatefulDecoder
encoded
- The PDU containing the LdapMessage to decodeDecoderException
- if anything goes wrongpublic Object decode(Object lock, InputStream in) throws ProviderException
decode
in interface ProviderDecoder
lock
- Lock object used to exclusively read from the input streamin
- The input stream to read and decode PDU bytes fromProviderException
- to indicate an error while attempting to decode the message
envelope onto the output stream. Provider specific exceptions
encountered while decoding can be held within this subclass
of MultiException.public Provider getProvider()
getProvider
in interface ProviderObject
public void setDecoderMonitor(DecoderMonitor monitor)
setDecoderMonitor
in interface StatefulDecoder
monitor
- to set for this StatefulDecoderpublic void setCallback(DecoderCallback cb)
setCallback
in interface StatefulDecoder
cb
- The callbackCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.