Class AbstractControlFactory<C extends Control>
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.AbstractControlFactory<C>
-
- Type Parameters:
C- The Control type
- All Implemented Interfaces:
ControlFactory<C>
- Direct Known Subclasses:
AdDirSyncRequestFactory,AdDirSyncResponseFactory,AdPolicyHintsFactory,AdShowDeletedFactory,CascadeFactory,ChangeNotificationsFactory,EntryChangeFactory,ManageDsaITFactory,OpaqueControlFactory,PagedResultsFactory,PasswordExpiredResponseFactory,PasswordPolicyRequestFactory,PasswordPolicyResponseFactory,PermissiveModifyFactory,PersistentSearchFactory,ProxiedAuthzFactory,RelaxControlFactory,SortRequestFactory,SortResponseFactory,SubentriesFactory,SyncDoneValueFactory,SyncRequestValueFactory,SyncStateValueFactory,TransactionSpecificationFactory,TreeDeleteFactory,VirtualListViewRequestFactory,VirtualListViewResponseFactory
public abstract class AbstractControlFactory<C extends Control> extends Object implements ControlFactory<C>
A factory that encode the Control value- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description protected LdapApiServicecodecThe LDAP codec responsible for encoding and decoding ManageDsaIT Controlprotected StringoidThe control's OID
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractControlFactory(LdapApiService codec, String oid)Creates a new instance of AbstractControlFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecodeValue(ControlContainer container, Control control, byte[] controlBytes)Decode a Control's value.voiddecodeValue(Control control, byte[] controlBytes)Decode a Control's value.voidencodeValue(Asn1Buffer buffer, Control control)Encode the value part of the control.StringgetOid()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.codec.api.ControlFactory
newControl
-
-
-
-
Field Detail
-
codec
protected LdapApiService codec
The LDAP codec responsible for encoding and decoding ManageDsaIT Control
-
oid
protected String oid
The control's OID
-
-
Constructor Detail
-
AbstractControlFactory
protected AbstractControlFactory(LdapApiService codec, String oid)
Creates a new instance of AbstractControlFactory.- Parameters:
codec- The LdapApiSevice instanceoid- The control's OID
-
-
Method Detail
-
getOid
public String getOid()
- Specified by:
getOidin interfaceControlFactory<C extends Control>- Returns:
- The OID of the Control this factory creates.
-
encodeValue
public void encodeValue(Asn1Buffer buffer, Control control)
Encode the value part of the control.- Specified by:
encodeValuein interfaceControlFactory<C extends Control>- Parameters:
buffer- The buffer into which to put the encoded valuecontrol- The control to encode
-
decodeValue
public void decodeValue(Control control, byte[] controlBytes) throws DecoderException
Decode a Control's value. It will feed the Control.- Specified by:
decodeValuein interfaceControlFactory<C extends Control>- Parameters:
control- The control to feedcontrolBytes- The data to decode- Throws:
DecoderException- If the value can't be decoded
-
decodeValue
public void decodeValue(ControlContainer container, Control control, byte[] controlBytes) throws DecoderException
Decode a Control's value. It will feed the Control.- Specified by:
decodeValuein interfaceControlFactory<C extends Control>- Parameters:
container- The Asn1Container containing the control to feedcontrol- The control to feedcontrolBytes- The data to decode- Throws:
DecoderException- If the value can't be decoded
-
-