Class AdPolicyHintsDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.ControlDecorator<AdPolicyHints>
-
- org.apache.directory.api.ldap.extras.controls.ad_impl.AdPolicyHintsDecorator
-
- All Implemented Interfaces:
Asn1Object
,CodecControl<AdPolicyHints>
,Decorator<AdPolicyHints>
,AdPolicyHints
,Control
public class AdPolicyHintsDecorator extends ControlDecorator<AdPolicyHints> implements AdPolicyHints
A decorator over a AdPolicyHints control.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.controls.ad.AdPolicyHints
OID
-
-
Constructor Summary
Constructors Constructor Description AdPolicyHintsDecorator(LdapApiService codec)
Creates a new instance of AdPolicyHintsDecorator.AdPolicyHintsDecorator(LdapApiService codec, AdPolicyHints adPolicyHintsRequest)
Creates a new instance of AdPolicyHintsDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeLength()
Compute the object length, which is the sum of all inner length.Asn1Object
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.ByteBuffer
encode(ByteBuffer buffer)
Encode the object to a PDU.int
getFlags()
byte[]
getValue()
Get the control valuevoid
setFlags(int flags)
Set the flags in the control.-
Methods inherited from class org.apache.directory.api.ldap.codec.api.ControlDecorator
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
-
-
-
-
Constructor Detail
-
AdPolicyHintsDecorator
public AdPolicyHintsDecorator(LdapApiService codec)
Creates a new instance of AdPolicyHintsDecorator.- Parameters:
codec
- The LDAP Service to use
-
AdPolicyHintsDecorator
public AdPolicyHintsDecorator(LdapApiService codec, AdPolicyHints adPolicyHintsRequest)
Creates a new instance of AdPolicyHintsDecorator.- Parameters:
codec
- The LDAP Service to useadPolicyHintsRequest
- The AdPolicyHints request to use
-
-
Method Detail
-
computeLength
public int computeLength()
Compute the object length, which is the sum of all inner length.- Specified by:
computeLength
in interfaceAsn1Object
- Returns:
- The object's computed length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the object to a PDU.- Specified by:
encode
in interfaceAsn1Object
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The encoded PDU.
- Throws:
EncoderException
- if the buffer can't be encoded
-
getValue
public byte[] getValue()
Get the control value- Specified by:
getValue
in interfaceCodecControl<AdPolicyHints>
- Overrides:
getValue
in classControlDecorator<AdPolicyHints>
- Returns:
- The control value
-
decode
public Asn1Object decode(byte[] controlBytes) throws DecoderException
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.- Specified by:
decode
in interfaceCodecControl<AdPolicyHints>
- Parameters:
controlBytes
- the encoded control bytes- Returns:
- the decoded Asn1Object for the control
- Throws:
DecoderException
- if anything goes wrong
-
getFlags
public int getFlags()
- Specified by:
getFlags
in interfaceAdPolicyHints
- Returns:
- The flags
-
setFlags
public void setFlags(int flags)
Set the flags in the control.- Specified by:
setFlags
in interfaceAdPolicyHints
- Parameters:
flags
- The flags to set.
-
-