Modifier and Type | Method and Description |
---|---|
String |
getOid()
Returns the numeric OID associated with this control.
|
ByteString |
getValue()
Returns the value, if any, associated with this control.
|
boolean |
hasValue()
Returns
true if this control has a value. |
boolean |
isCritical()
Returns
true if it is unacceptable to perform the operation
without applying the semantics of this control. |
static GenericControl |
newControl(Control control)
Creates a new control having the same OID, criticality, and value as the
provided control.
|
static GenericControl |
newControl(String oid)
Creates a new non-critical control having the provided OID and no value.
|
static GenericControl |
newControl(String oid,
boolean isCritical)
Creates a new control having the provided OID and criticality, but no
value.
|
static GenericControl |
newControl(String oid,
boolean isCritical,
Object value)
Creates a new control having the provided OID, criticality, and value.
|
String |
toString() |
public static GenericControl newControl(Control control)
control
- The control to be copied.NullPointerException
- If control
was null
.public static GenericControl newControl(String oid)
oid
- The numeric OID associated with this control.NullPointerException
- If oid
was null
.public static GenericControl newControl(String oid, boolean isCritical)
oid
- The numeric OID associated with this control.isCritical
- true
if it is unacceptable to perform the operation
without applying the semantics of this control, or
false
if it can be ignored.NullPointerException
- If oid
was null
.public static GenericControl newControl(String oid, boolean isCritical, Object value)
If value
is not an instance of ByteString
then it will be
converted using the ByteString.valueOfObject(Object)
method.
oid
- The numeric OID associated with this control.isCritical
- true
if it is unacceptable to perform the operation
without applying the semantics of this control, or
false
if it can be ignored.value
- The value associated with this control, or null
if
there is no value. Its format is defined by the specification
of this control.NullPointerException
- If oid
was null
.public String getOid()
Control
public ByteString getValue()
Control
public boolean hasValue()
Control
true
if this control has a value. In some circumstances
it may be useful to determine if a control has a value, without actually
calculating the value and incurring any performance costs.public boolean isCritical()
Control
true
if it is unacceptable to perform the operation
without applying the semantics of this control.
The criticality field only has meaning in controls attached to request
messages (except UnbindRequest). For controls attached to response
messages and the UnbindRequest, the criticality field SHOULD be
false
, and MUST be ignored by the receiving protocol peer. A
value of true
indicates that it is unacceptable to perform the
operation without applying the semantics of the control.
isCritical
in interface Control
true
if this control must be processed by the Directory
Server, or false
if it can be ignored.Copyright 2010-2022 ForgeRock AS.