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

public Interface Control

extends Serializable
Known Direct Implementers
com.sun.jndi.ldap.BasicControl, javax.naming.ldap.BasicControl

This interface represents an LDAPv3 control as defined in RFC 2251.

The LDAPv3 protocol uses controls to send and receive additional data to affect the behavior of predefined operations. Controls can be sent along with any LDAP operation to the server. These are referred to as request controls. For example, a "sort" control can be sent with an LDAP search operation to request that the results be returned in a particular order. Solicited and unsolicited controls can also be returned with responses from the server. Such controls are referred to as response controls. For example, an LDAP server might define a special control to return change notifications.

This interface is used to represent both request and response controls.

Authors
Rosanna Lee, Scott Seligman, Vincent Ryan
Since
1.3
See Also
ControlFactory

Field Summary

Modifier and TypeField and Description
public static final boolean
CRITICAL

Indicates a critical control.

public static final boolean
NONCRITICAL

Indicates a non-critical control.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

A possibly null byte array representing the ASN.1 BER encoded value of the LDAP control.
getEncodedValue
()

Retrieves the ASN.1 BER encoded value of the LDAP control.

public String

Returns:

The non-null object identifier string.
getID
()

Retrieves the object identifier assigned for the LDAP control.

public boolean

Returns:

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

Determines the criticality of the LDAP control.

Field Detail

CRITICALback to summary
public static final boolean CRITICAL

Indicates a critical control. The value of this constant is true.

NONCRITICALback to summary
public static final boolean NONCRITICAL

Indicates a non-critical control. The value of this constant is false.

Method Detail

getEncodedValueback to summary
public byte[] getEncodedValue()

Retrieves the ASN.1 BER encoded value of the LDAP control. The result is the raw BER bytes including the tag and length of the control's value. It does not include the controls OID or criticality. Null is returned if the value is absent.

Returns:byte[]

A possibly null byte array representing the ASN.1 BER encoded value of the LDAP control.

getIDback to summary
public String getID()

Retrieves the object identifier assigned for the LDAP control.

Returns:String

The non-null object identifier string.

isCriticalback to summary
public boolean isCritical()

Determines the criticality of the LDAP control. A critical control must not be ignored by the server. In other words, if the server receives a critical control that it does not support, regardless of whether the control makes sense for the operation, the operation will not be performed and an OperationNotSupportedException will be thrown.

Returns:boolean

true if this control is critical; false otherwise.