APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.jndi.ldap

public Class BasicControl

extends Object
implements Control
Class Inheritance
All Implemented Interfaces
javax.naming.ldap.Control, java.io.Serializable
Known Direct Subclasses
com.sun.jndi.ldap.EntryChangeResponseControl, com.sun.jndi.ldap.ManageReferralControl, com.sun.jndi.ldap.PersistentSearchControl
Imports
javax.naming.ldap.*

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

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 new instance of BasicControl.

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. May be null.
value
)

Constructs a new instance of BasicControl.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

A possibly null byte array representing the control's ASN.1 BER encoded value.
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 new instance of BasicControl. It is 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 new instance of BasicControl.

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. 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 is the raw BER bytes including the tag and length of the control's value. It does not include the control's object identifier string or criticality.

Returns:byte[]

A possibly null byte array representing the control's ASN.1 BER encoded value.

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.