netscape.ldap.controls
Class LDAPStringControl

java.lang.Object
  extended bynetscape.ldap.LDAPControl
      extended bynetscape.ldap.controls.LDAPStringControl
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
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
           
 
Fields inherited from class netscape.ldap.LDAPControl
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
 
Constructor Summary
(package private) 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 netscape.ldap.LDAPControl
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_msg

protected java.lang.String m_msg
Constructor Detail

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 control
critical - true if this control is critical to the search
value - the value associated with this control
See Also:
netscape.ldap.LDAPcontrol
Method Detail

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