org.apache.directory.shared.ldap.codec.api
Interface Decorator<E>

All Known Subinterfaces:
CodecControl<E>
All Known Implementing Classes:
AbandonableRequestDecorator, AbandonableResultResponseRequestDecorator, AbandonRequestDecorator, AddRequestDecorator, AddResponseDecorator, BasicControlDecorator, BindRequestDecorator, BindResponseDecorator, CascadeDecorator, CompareRequestDecorator, CompareResponseDecorator, ControlDecorator, DeleteRequestDecorator, DeleteResponseDecorator, EntryChangeDecorator, ExtendedRequestDecorator, ExtendedResponseDecorator, IntermediateResponseDecorator, LdapResultDecorator, ManageDsaITDecorator, MessageDecorator, ModifyDnRequestDecorator, ModifyDnResponseDecorator, ModifyRequestDecorator, ModifyResponseDecorator, PagedResultsDecorator, PasswordPolicyDecorator, PersistentSearchDecorator, RequestDecorator, ResponseDecorator, ResultResponseRequestDecorator, SearchRequestDecorator, SearchResultDoneDecorator, SearchResultEntryDecorator, SearchResultReferenceDecorator, SingleReplyRequestDecorator, SubentriesDecorator, SyncDoneValueDecorator, SyncInfoValueDecorator, SyncModifyDnDecorator, SyncRequestValueDecorator, SyncStateValueDecorator, UnbindRequestDecorator

public interface Decorator<E>

The codec uses this interface to add additional information to LDAP Model objects during encoding and decoding,

Author:
Apache Directory Project

Method Summary
 int computeLength()
          Compute the object length, which is the sum of all inner length.
 ByteBuffer encode(ByteBuffer buffer)
          Encode the object to a PDU.
 LdapCodecService getCodecService()
          Gets the codec service responsible for managing the encoding and decoding of the decorated objects.
 E getDecorated()
          Gets the object being decorated by this IDecorator.
 

Method Detail

getDecorated

E getDecorated()
Gets the object being decorated by this IDecorator.

Returns:
The decorated object

computeLength

int computeLength()
Compute the object length, which is the sum of all inner length.

Returns:
The object's computed length

encode

ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Encode the object to a PDU.

Parameters:
buffer - The buffer where to put the PDU
Returns:
The PDU.
Throws:
EncoderException - if the buffer can't be encoded

getCodecService

LdapCodecService getCodecService()
Gets the codec service responsible for managing the encoding and decoding of the decorated objects.

Returns:
the codec service


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.