netscape.ldap.controls
Class LDAPStringControl
java.lang.Object
netscape.ldap.LDAPControl
netscape.ldap.controls.LDAPStringControl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- LDAPPasswordExpiredControl, LDAPPasswordExpiringControl
abstract class LDAPStringControl
- extends LDAPControl
Represents an LDAP v3 server control that contains a string as its
only value. This is to be used as a base class by real such controls.
|
Field Summary |
protected java.lang.String |
m_msg
|
|
Constructor Summary |
LDAPStringControl()
|
LDAPStringControl(java.lang.String oid,
boolean critical,
byte[] value)
Constructs an LDAPStringControl object, and stores the
value as a string. |
|
Method Summary |
static java.lang.String |
parseResponse(LDAPControl[] controls,
java.lang.String type)
Parses a response control sent by the server and
retrieves a string. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
m_msg
protected java.lang.String m_msg
LDAPStringControl
LDAPStringControl()
LDAPStringControl
public LDAPStringControl(java.lang.String oid,
boolean critical,
byte[] value)
- Constructs an
LDAPStringControl object, and stores the
value as a string. To retrieve this string value, use
getMsg().
- Parameters:
oid - the oid of this controlcritical - true if this control is critical to the searchvalue - the value associated with this control- See Also:
netscape.ldap.LDAPcontrol
parseResponse
public static java.lang.String parseResponse(LDAPControl[] controls,
java.lang.String type)
- Parses a response control sent by the server and
retrieves a string.
You can get the controls returned by the server by using the
getResponseControls method of the
LDAPConnection class.
- Parameters:
controls - an array of LDAPControl objects,
representing the controls returned by the server
after a search. To get these controls, use the
getResponseControls method of the
LDAPConnection class.type - the OID of the control to look for
- Returns:
- a message string, or null if the server did
not return a string.
- See Also:
LDAPConnection.getResponseControls()