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
public final class OpaqueControl extends AbstractControl
A finalControl
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
Constructors Constructor Description OpaqueControl(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getEncodedValue()
boolean
hasEncodedValue()
Tells if the control has a stored value.void
setEncodedValue(byte[] value)
Stores an opaque value into the control.-
Methods inherited from class org.apache.directory.api.ldap.model.message.controls.AbstractControl
equals, getOid, hashCode, isCritical, setCritical, toString
-
-
-
-
Constructor Detail
-
OpaqueControl
public OpaqueControl(String oid)
Creates a Control with a specific OID.- Parameters:
oid
- The OID of this Control.
-
OpaqueControl
public OpaqueControl(String oid, boolean criticality)
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 Detail
-
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
-
-