com.netscape.jndi.ldap.controls
Class LdapPasswordExpiredControl

java.lang.Object
  extended by netscape.ldap.LDAPControl
      extended by netscape.ldap.controls.LDAPPasswordExpiredControl
          extended by com.netscape.jndi.ldap.controls.LdapPasswordExpiredControl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.naming.ldap.Control

public class LdapPasswordExpiredControl
extends netscape.ldap.controls.LDAPPasswordExpiredControl
implements javax.naming.ldap.Control

Represents an LDAP v3 server control that may be returned if a password has expired, and password policy is enabled on the server. The OID for this control is 2.16.840.1.113730.3.4.4.

See Also:
Serialized Form

Field Summary
protected  java.lang.String m_msg
           
 
Fields inherited from class netscape.ldap.controls.LDAPPasswordExpiredControl
EXPIRED
 
Fields inherited from class netscape.ldap.LDAPControl
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
 
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
 
Method Summary
 byte[] getEncodedValue()
          Retrieves the ASN.1 BER encoded value of the LDAP control.
 java.lang.String getMessage()
          Return string message passed in the control
static java.lang.String parseResponse(netscape.ldap.LDAPControl[] controls, java.lang.String type)
          Parses a response control sent by the server and retrieves a string.
 
Methods inherited from class netscape.ldap.controls.LDAPPasswordExpiredControl
parseResponse, toString
 
Methods inherited from class netscape.ldap.LDAPControl
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.naming.ldap.Control
getID, isCritical
 

Field Detail

m_msg

protected java.lang.String m_msg
Method Detail

getMessage

public java.lang.String getMessage()
Return string message passed in the control

Overrides:
getMessage in class netscape.ldap.controls.LDAPPasswordExpiredControl
Returns:
message string

getEncodedValue

public byte[] getEncodedValue()
Retrieves the ASN.1 BER encoded value of the LDAP control. Null is returned if the value is absent.

Specified by:
getEncodedValue in interface javax.naming.ldap.Control
Returns:
A possibly null byte array representing the ASN.1 BER encoded value of the LDAP control.

parseResponse

public static java.lang.String parseResponse(netscape.ldap.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()