Class OpaqueControl
java.lang.Object
org.apache.directory.api.ldap.model.message.controls.AbstractControl
org.apache.directory.api.ldap.model.message.controls.OpaqueControl
- All Implemented Interfaces:
Control
A final
Control implementation intended specifically for handling
controls who's values cannot be encoded or decoded by the codec service.
This situation results when no Control factory is found to be
registered for this control's OID. Hence additional opaque value handling
methods are included to manage the opaque control value.- Author:
- Apache Directory Project
-
Constructor Summary
ConstructorsConstructorDescriptionOpaqueControl(String oid) Creates a Control with a specific OID.OpaqueControl(String oid, boolean criticality) Creates a Control with a specific OID, and criticality set. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]booleanTells if the control has a stored value.voidsetEncodedValue(byte[] value) Stores an opaque value into the control.Methods inherited from class AbstractControl
equals, getOid, hashCode, isCritical, setCritical, toString
-
Constructor Details
-
OpaqueControl
Creates a Control with a specific OID.- Parameters:
oid- The OID of this Control.
-
OpaqueControl
Creates a Control with a specific OID, and criticality set.- Parameters:
oid- The OID of this Control.criticality- true if this Control is critical, false otherwise.
-
-
Method Details
-
getEncodedValue
public byte[] getEncodedValue()- Returns:
- The encoded value
-
setEncodedValue
public void setEncodedValue(byte[] value) Stores an opaque value into the control.- Parameters:
value- The opaque value to store
-
hasEncodedValue
public boolean hasEncodedValue()Tells if the control has a stored value. Note that if the control has an empty value, this method will return true.- Returns:
- true if the control has a value
-