APIdia Launch Partner
Top Description Fields Constructors Methods
javax.naming.ldap

public Class BasicControl

extends Object
implements Control
Class Inheritance
All Implemented Interfaces
javax.naming.ldap.Control, java.io.Serializable
Known Direct Subclasses
javax.naming.ldap.ManageReferralControl, javax.naming.ldap.PagedResultsControl, javax.naming.ldap.PagedResultsResponseControl, javax.naming.ldap.SortControl, javax.naming.ldap.SortResponseControl

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

Field Summary

Modifier and TypeField and Description
protected boolean
criticality

The control's criticality.

protected String
id

The control's object identifier string.

private static final long
protected byte[]
value

The control's ASN.1 BER encoded value.

Constructor Summary

AccessConstructor and Description
public
BasicControl(String
The control's object identifier string.
id
)

Constructs a non-critical control.

public
BasicControl(String
The control's object identifier string.
id
,
boolean
The control's criticality.
criticality
,
byte[]
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.
value
)

Constructs a control using the supplied arguments.

Method Summary

Modifier and TypeMethod and Description
public byte[]

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.
getEncodedValue
()

Implements javax.naming.ldap.Control.getEncodedValue.

Retrieves the control's ASN.1 BER encoded value.

public String

Returns:

The non-null object identifier string.
getID
()

Implements javax.naming.ldap.Control.getID.

Retrieves the control's object identifier string.

public boolean

Returns:

true if the control is critical; false otherwise.
isCritical
()

Implements javax.naming.ldap.Control.isCritical.

Determines the control's criticality.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

criticalityback to summary
protected boolean criticality

The control's criticality.

idback to summary
protected String id

The control's object identifier string.

serialVersionUIDback to summary
private static final long serialVersionUID
valueback to summary
protected byte[] value

The control's ASN.1 BER encoded value.

Constructor Detail

BasicControlback to summary
public BasicControl(String id)

Constructs a non-critical control.

Parameters
id:String

The control's object identifier string.

BasicControlback to summary
public BasicControl(String id, boolean criticality, byte[] value)

Constructs a control using the supplied arguments.

Parameters
id:String

The control's object identifier string.

criticality:boolean

The control's criticality.

value:byte[]

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

getEncodedValueback to summary
public byte[] getEncodedValue()

Implements javax.naming.ldap.Control.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.

Returns:byte[]

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.

getIDback to summary
public String getID()

Implements javax.naming.ldap.Control.getID.

Retrieves the control's object identifier string.

Returns:String

The non-null object identifier string.

isCriticalback to summary
public boolean isCritical()

Implements javax.naming.ldap.Control.isCritical.

Determines the control's criticality.

Returns:boolean

true if the control is critical; false otherwise.