public final class MessageDecoder extends Object implements ProviderDecoder
| Constructor and Description |
|---|
MessageDecoder(BinaryAttributeDetector binaryAttributeDetector)
Creates a MessageDecoder using default properties for enabling a BER
library provider.
|
MessageDecoder(BinaryAttributeDetector binaryAttributeDetector,
int maxPDUSize)
Creates a MessageDecoder using default properties for enabling a BER
library provider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(Object chunk)
Decodes a chunk of stream data returning any resultant decoded PDU via a
callback.
|
Object |
decode(Object lock,
InputStream in)
Reads and decodes a BER encoded LDAPv3 ASN.1 message envelope structure
from an input stream to build a fully populated Message object instance.
|
Provider |
getProvider()
Gets the Provider associated with this SPI implementation object.
|
void |
setCallback(DecoderCallback cb)
Sets the callback used to deliver completly decoded PDU's.
|
void |
setDecoderMonitor(DecoderMonitor monitor)
Sets the monitor for this MessageDecoder which receives callbacks for
noteworthy events during decoding.
|
public MessageDecoder(BinaryAttributeDetector binaryAttributeDetector) throws MessageException
binaryAttributeDetector - detects whether or not an attribute is binaryMessageException - if there is a problem creating this decoder.public MessageDecoder(BinaryAttributeDetector binaryAttributeDetector, int maxPDUSize) throws MessageException
binaryAttributeDetector - detects whether or not an attribute is binarymaxPDUSize - the maximum size a PDU can beMessageException - if there is a problem creating this decoder.public Object decode(Object lock, InputStream in) throws MessageException
decode in interface ProviderDecoderlock - lock object used to exclusively read from the input streamin - the input stream to read PDU data from.MessageException - if there is a problem decoding.public void decode(Object chunk) throws MessageException
decode in interface StatefulDecoderchunk - the chunk to decodeMessageException - if there are failures while decoding the chunkpublic void setCallback(DecoderCallback cb)
setCallback in interface StatefulDecodercb - the callback to use for decoded PDU deliverypublic void setDecoderMonitor(DecoderMonitor monitor)
setDecoderMonitor in interface StatefulDecodermonitor - the monitor to receive notifications via callback eventspublic Provider getProvider()
ProviderObjectgetProvider in interface ProviderObjectCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.