|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.message.MessageDecoder
public final class MessageDecoder
Decodes a BER encoded LDAPv3 message envelope from an input stream demarshaling it into a Message instance using a BER library provider.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
decode(java.lang.Object chunk)
Decodes a chunk of stream data returning any resultant decoded PDU via a callback. |
java.lang.Object |
decode(java.lang.Object lock,
java.io.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageDecoder(BinaryAttributeDetector binaryAttributeDetector) throws MessageException
binaryAttributeDetector
- detects whether or not an attribute is binary
MessageException
- 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 be
MessageException
- if there is a problem creating this decoder.Method Detail |
---|
public java.lang.Object decode(java.lang.Object lock, java.io.InputStream in) throws MessageException
decode
in interface ProviderDecoder
lock
- 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(java.lang.Object chunk) throws MessageException
decode
in interface StatefulDecoder
chunk
- the chunk to decode
MessageException
- if there are failures while decoding the chunkpublic void setCallback(DecoderCallback cb)
setCallback
in interface StatefulDecoder
cb
- the callback to use for decoded PDU deliverypublic void setDecoderMonitor(DecoderMonitor monitor)
setDecoderMonitor
in interface StatefulDecoder
monitor
- the monitor to receive notifications via callback eventspublic Provider getProvider()
ProviderObject
getProvider
in interface ProviderObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |