public class LdapEncoder extends Object implements ProviderEncoder
Constructor and Description |
---|
LdapEncoder(Provider provider)
Creates an instance of a Ldap Encoder implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
encode(Object obj)
Encodes a LdapMessage, and calls the callback
|
ByteBuffer |
encodeBlocking(Object obj)
Encodes a LdapMessage, and return a ByteBuffer containing the resulting
PDU
|
void |
encodeBlocking(Object lock,
OutputStream out,
Object obj)
Encodes a LdapMessage, and calls the callback.
|
byte[] |
encodeToArray(Object obj)
Encodes a LdapMessage, and return a byte array containing the resulting
PDU
|
Provider |
getProvider()
Gets the Provider associated with this SPI implementation object.
|
void |
setCallback(EncoderCallback cb)
Set the callback called when the encoding is done.
|
void |
setEncoderMonitor(EncoderMonitor monitor)
Deprecated.
|
public LdapEncoder(Provider provider)
provider
- The associated Providerpublic void encodeBlocking(Object lock, OutputStream out, Object obj) throws ProviderException
encodeBlocking
in interface ProviderEncoder
lock
- Not used...out
- Not used ...obj
- The LdapMessage to encodeProviderException
- If anything went wrongpublic ByteBuffer encodeBlocking(Object obj) throws ProviderException
encodeBlocking
in interface ProviderEncoder
obj
- The LdapMessage to encodeProviderException
- If anything went wrongpublic byte[] encodeToArray(Object obj) throws ProviderException
obj
- The LdapMessage to encodeProviderException
- If anything went wrongpublic Provider getProvider()
getProvider
in interface ProviderObject
public void encode(Object obj) throws EncoderException
encode
in interface StatefulEncoder
obj
- The LdapMessage to encodeEncoderException
- If anything went wrongpublic void setCallback(EncoderCallback cb)
setCallback
in interface StatefulEncoder
cb
- The callback.public void setEncoderMonitor(EncoderMonitor monitor)
setEncoderMonitor
in interface StatefulEncoder
monitor
- the monitor to set on the underlying implementationCopyright © 2003-2012 Apache Software Foundation. All Rights Reserved.