|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.message.MessageEncoder
public final class MessageEncoder
Encodes a Message instance into a binary message envelope using Basic Encoding rules flushing the PDU out to an OutputStream.
| Constructor Summary | |
|---|---|
MessageEncoder()
Creates a MessageEncoder using default properties for enabling a BER library provider. |
|
| Method Summary | |
|---|---|
void |
encode(java.lang.Object obj)
Encodes a Message object piece by piece often emitting chunks of the final PDU to the callback if present. |
java.nio.ByteBuffer |
encodeBlocking(java.lang.Object obj)
Encodes a compiler stub specific ASN.1 message envelope containment tree into byte array. |
void |
encodeBlocking(java.lang.Object lock,
java.io.OutputStream out,
java.lang.Object obj)
Encodes a compiler stub specific ASN.1 message envelope containment tree onto an output stream. |
Provider |
getProvider()
Gets the Provider associated with this SPI implementation object. |
void |
setCallback(EncoderCallback cb)
Sets the callback of the underlying implementation. |
void |
setEncoderMonitor(EncoderMonitor monitor)
Sets the monitor of the underlying implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageEncoder()
throws MessageException
MessageException - if the encoder cannot be created.| Method Detail |
|---|
public void encodeBlocking(java.lang.Object lock,
java.io.OutputStream out,
java.lang.Object obj)
throws ProviderException
ProviderEncoder
encodeBlocking in interface ProviderEncoderlock - lock object used to exclusively write to the output streamout - the OutputStream to encode the message envelope onto.obj - the top-level message envelope stub instance, i.e. for the
Snacc4J service provider this would be an instance of the
LDAPMessage compiler generated stub class.
ProviderException - to indicate an error while attempting to encode the message
envelope onto the output stream. Provider specific exceptions
encountered while encoding can be held within this subclass
of MultiException.ProviderEncoder.encodeBlocking(Object, java.io.OutputStream, Object)
public java.nio.ByteBuffer encodeBlocking(java.lang.Object obj)
throws ProviderException
ProviderEncoder
encodeBlocking in interface ProviderEncoderobj - the top-level message envelope stub instance, i.e. for the
Snacc4J service provider this would be an instance of the
LDAPMessage compiler generated stub class.
ProviderException - to indicate an error while attempting to encode the message
envelope into a byte buffer. Provider specific exceptions
encountered while encoding can be held within this subclass
of MultiException.ProviderEncoder.encodeBlocking(Object)public Provider getProvider()
ProviderObject
getProvider in interface ProviderObjectProviderObject.getProvider()
public void encode(java.lang.Object obj)
throws EncoderException
encode in interface StatefulEncoderobj - the message object to encode into a PDU
EncoderException - if there are problems while encodingpublic void setCallback(EncoderCallback cb)
setCallback in interface StatefulEncodercb - the callback to set on the underlying provider specific encoderpublic void setEncoderMonitor(EncoderMonitor monitor)
setEncoderMonitor in interface StatefulEncodermonitor - the monitor to set on the underlying implementation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||