org.apache.directory.shared.ldap.codec.api
Interface CodecControl<E extends Control>

All Superinterfaces:
Control, Decorator<E>
All Known Implementing Classes:
BasicControlDecorator, CascadeDecorator, ControlDecorator, EntryChangeDecorator, ManageDsaITDecorator, PagedResultsDecorator, PasswordPolicyDecorator, PersistentSearchDecorator, SubentriesDecorator, SyncDoneValueDecorator, SyncInfoValueDecorator, SyncModifyDnDecorator, SyncRequestValueDecorator, SyncStateValueDecorator

public interface CodecControl<E extends Control>
extends Control, Decorator<E>

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

Author:
Apache Directory Project

Method Summary
 Asn1Object decode(byte[] controlBytes)
          Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
 byte[] getValue()
          Gets the binary ASN.1 BER encoded representation of the control.
 boolean hasValue()
          Checks to see if a value is set for this CodecControl.
 void setValue(byte[] value)
          Set the Control's encoded control value.
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.Control
getOid, isCritical, setCritical
 
Methods inherited from interface org.apache.directory.shared.ldap.codec.api.Decorator
computeLength, encode, getCodecService, getDecorated
 

Method Detail

decode

Asn1Object decode(byte[] controlBytes)
                  throws DecoderException
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.

Parameters:
controlBytes - the encoded control bytes
Returns:
the decoded Asn1Object for the control
Throws:
DecoderException - if anything goes wrong

hasValue

boolean hasValue()
Checks to see if a value is set for this CodecControl.

Returns:
true, if this control has a value, false otherwise

getValue

byte[] getValue()
Gets the binary ASN.1 BER encoded representation of the control.

Returns:
The control's encoded value

setValue

void setValue(byte[] value)
Set the Control's encoded control value.

Parameters:
value - The encoded control value to store.


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