org.opends.server.types
Class Control

java.lang.Object
  extended by org.opends.server.types.Control
Direct Known Subclasses:
AccountUsableRequestControl, AccountUsableResponseControl, AuthorizationIdentityResponseControl, EntryChangeNotificationControl, GetEffectiveRights, LDAPAssertionRequestControl, LDAPPostReadRequestControl, LDAPPostReadResponseControl, LDAPPreReadRequestControl, LDAPPreReadResponseControl, MatchedValuesControl, PagedResultsControl, PasswordExpiredControl, PasswordExpiringControl, PasswordPolicyRequestControl, PasswordPolicyResponseControl, PersistentSearchControl, ProxiedAuthV1Control, ProxiedAuthV2Control, ReplicationRepairRequestControl, ServerSideSortRequestControl, ServerSideSortResponseControl, VLVRequestControl, VLVResponseControl

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=true,
           mayExtend=true,
           mayInvoke=true)
public class Control
extends java.lang.Object

This class defines a data structure that holds information about a control that can be included in a request or response.


Constructor Summary
Control(java.lang.String oid, boolean isCritical)
          Creates a new control with no value.
Control(java.lang.String oid, boolean isCritical, ASN1OctetString value)
          Creates a new control with the specified information.
 
Method Summary
 java.lang.String getOID()
          Retrieves the OID for this control.
 ASN1OctetString getValue()
          Retrieves the value for this control.
 boolean hasValue()
          Indicates whether this control has a value.
 boolean isCritical()
          Indicates whether this control should be considered critical in processing the request.
 void setCritical(boolean isCritical)
          Specifies whether this control should be considered critical in processing the request.
 void setOID(java.lang.String oid)
          Specifies the OID for this control.
 void setValue(ASN1OctetString value)
          Specifies the value for this control.
 java.lang.String toString()
          Retrieves a string representation of this control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this control to the provided buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Control

public Control(java.lang.String oid,
               boolean isCritical)
Creates a new control with no value.

Parameters:
oid - The OID for this control.
isCritical - Indicates whether this control should be considered critical in processing the request.

Control

public Control(java.lang.String oid,
               boolean isCritical,
               ASN1OctetString value)
Creates a new control with the specified information.

Parameters:
oid - The OID for this control.
isCritical - Indicates whether this control should be considered critical in processing the request.
value - The value for this control.
Method Detail

getOID

public final java.lang.String getOID()
Retrieves the OID for this control.

Returns:
The OID for this control.

setOID

public final void setOID(java.lang.String oid)
Specifies the OID for this control.

Parameters:
oid - The OID for this control.

isCritical

public final boolean isCritical()
Indicates whether this control should be considered critical in processing the request.

Returns:
true if this code should be considered critical, or false if not.

setCritical

public final void setCritical(boolean isCritical)
Specifies whether this control should be considered critical in processing the request.

Parameters:
isCritical - Specifies whether this control should be considered critical in processing the request.

getValue

public final ASN1OctetString getValue()
Retrieves the value for this control.

Returns:
The value for this control, or null if there is no value.

hasValue

public final boolean hasValue()
Indicates whether this control has a value.

Returns:
true if this control has a value, or false if it does not.

setValue

public final void setValue(ASN1OctetString value)
Specifies the value for this control.

Parameters:
value - The value for this control.

toString

public java.lang.String toString()
Retrieves a string representation of this control.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this control.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this control to the provided buffer.

Parameters:
buffer - The buffer to which the information should be appended.