javax.naming.ldap
Class BasicControl

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.naming.ldap.BasicControl
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control
Direct Known Subclasses:
ManageReferralControl sample code for javax.naming.ldap.ManageReferralControl definition code for javax.naming.ldap.ManageReferralControl , PagedResultsControl sample code for javax.naming.ldap.PagedResultsControl definition code for javax.naming.ldap.PagedResultsControl , PagedResultsResponseControl sample code for javax.naming.ldap.PagedResultsResponseControl definition code for javax.naming.ldap.PagedResultsResponseControl , SortControl sample code for javax.naming.ldap.SortControl definition code for javax.naming.ldap.SortControl , SortResponseControl sample code for javax.naming.ldap.SortResponseControl definition code for javax.naming.ldap.SortResponseControl

public class BasicControl
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control

This class provides a basic implementation of the Control interface. It represents an LDAPv3 Control as defined in RFC 2251.

Since:
1.5
See Also:
Serialized Form

Field Summary
protected  boolean criticality sample code for javax.naming.ldap.BasicControl.criticality definition code for javax.naming.ldap.BasicControl.criticality
          The control's criticality.
protected  String sample code for java.lang.String definition code for java.lang.String id sample code for javax.naming.ldap.BasicControl.id definition code for javax.naming.ldap.BasicControl.id
          The control's object identifier string.
protected  byte[] value sample code for javax.naming.ldap.BasicControl.value definition code for javax.naming.ldap.BasicControl.value
          The control's ASN.1 BER encoded value.
 
Fields inherited from interface javax.naming.ldap.Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control
CRITICAL sample code for javax.naming.ldap.Control.CRITICAL definition code for javax.naming.ldap.Control.CRITICAL , NONCRITICAL sample code for javax.naming.ldap.Control.NONCRITICAL definition code for javax.naming.ldap.Control.NONCRITICAL
 
Constructor Summary
BasicControl sample code for javax.naming.ldap.BasicControl.BasicControl(java.lang.String) definition code for javax.naming.ldap.BasicControl.BasicControl(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  id)
          Constructs a non-critical control.
BasicControl sample code for javax.naming.ldap.BasicControl.BasicControl(java.lang.String, boolean, byte[]) definition code for javax.naming.ldap.BasicControl.BasicControl(java.lang.String, boolean, byte[]) (String sample code for java.lang.String definition code for java.lang.String  id, boolean criticality, byte[] value)
          Constructs a control using the supplied arguments.
 
Method Summary
 byte[] getEncodedValue sample code for javax.naming.ldap.BasicControl.getEncodedValue() definition code for javax.naming.ldap.BasicControl.getEncodedValue() ()
          Retrieves the control's ASN.1 BER encoded value.
 String sample code for java.lang.String definition code for java.lang.String getID sample code for javax.naming.ldap.BasicControl.getID() definition code for javax.naming.ldap.BasicControl.getID() ()
          Retrieves the control's object identifier string.
 boolean isCritical sample code for javax.naming.ldap.BasicControl.isCritical() definition code for javax.naming.ldap.BasicControl.isCritical() ()
          Determines the control's criticality.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

id sample code for javax.naming.ldap.BasicControl.id

protected String sample code for java.lang.String definition code for java.lang.String  id
The control's object identifier string.


criticality sample code for javax.naming.ldap.BasicControl.criticality

protected boolean criticality
The control's criticality.


value sample code for javax.naming.ldap.BasicControl.value

protected byte[] value
The control's ASN.1 BER encoded value.

Constructor Detail

BasicControl sample code for javax.naming.ldap.BasicControl(java.lang.String) definition code for javax.naming.ldap.BasicControl(java.lang.String)

public BasicControl(String sample code for java.lang.String definition code for java.lang.String  id)
Constructs a non-critical control.

Parameters:
id - The control's object identifier string.

BasicControl sample code for javax.naming.ldap.BasicControl(java.lang.String, boolean, byte[]) definition code for javax.naming.ldap.BasicControl(java.lang.String, boolean, byte[])

public BasicControl(String sample code for java.lang.String definition code for java.lang.String  id,
                    boolean criticality,
                    byte[] value)
Constructs a control using the supplied arguments.

Parameters:
id - The control's object identifier string.
criticality - The control's criticality.
value - The control's ASN.1 BER encoded value. It is not cloned - any changes to value will affect the contents of the control. It may be null.
Method Detail

getID sample code for javax.naming.ldap.BasicControl.getID() definition code for javax.naming.ldap.BasicControl.getID()

public String sample code for java.lang.String definition code for java.lang.String  getID()
Retrieves the control's object identifier string.

Specified by:
getID sample code for javax.naming.ldap.Control.getID() definition code for javax.naming.ldap.Control.getID() in interface Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control
Returns:
The non-null object identifier string.

isCritical sample code for javax.naming.ldap.BasicControl.isCritical() definition code for javax.naming.ldap.BasicControl.isCritical()

public boolean isCritical()
Determines the control's criticality.

Specified by:
isCritical sample code for javax.naming.ldap.Control.isCritical() definition code for javax.naming.ldap.Control.isCritical() in interface Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control
Returns:
true if the control is critical; false otherwise.

getEncodedValue sample code for javax.naming.ldap.BasicControl.getEncodedValue() definition code for javax.naming.ldap.BasicControl.getEncodedValue()

public byte[] getEncodedValue()
Retrieves the control's ASN.1 BER encoded value. The result includes the BER tag and length for the control's value but does not include the control's object identifier and criticality setting.

Specified by:
getEncodedValue sample code for javax.naming.ldap.Control.getEncodedValue() definition code for javax.naming.ldap.Control.getEncodedValue() in interface Control sample code for javax.naming.ldap.Control definition code for javax.naming.ldap.Control
Returns:
A possibly null byte array representing the control's ASN.1 BER encoded value. It is not cloned - any changes to the returned value will affect the contents of the control.