public class LDAPPasswordExpiringControl extends LDAPControl
LDAPControl
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
EXPIRING |
protected java.lang.String |
m_msg |
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
Constructor and Description |
---|
LDAPPasswordExpiringControl(java.lang.String oid,
boolean critical,
byte[] value)
Contructs an
LDAPPasswordExpiringControl object. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Gets the value associated with this control parsed as a string.
|
int |
getSecondsToExpiration()
Gets the number of seconds until the password expires returned by the
server.
|
static java.lang.String |
parseResponse(LDAPControl[] controls)
Deprecated.
LDAPPasswordExpiringControl controls are now automatically
instantiated.
|
static java.lang.String |
parseResponse(LDAPControl[] controls,
java.lang.String type)
Parses a response control sent by the server and
retrieves a string.
|
java.lang.String |
toString()
Return a string representation of the control for debugging
|
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
public static final java.lang.String EXPIRING
protected java.lang.String m_msg
public LDAPPasswordExpiringControl(java.lang.String oid, boolean critical, byte[] value) throws LDAPException
LDAPPasswordExpiringControl
object.
This constructor is used by LDAPControl.register
to
instantiate password expiring controls.
To retrieve the number of seconds until this password expires,
call getSecondsToExpiration
.
oid
- this parameter must be
LDAPPasswordExpiringControl.EXPIRING
or an LDAPException
is throwncritical
- true
if this control is criticalvalue
- the value associated with this controlLDAPException
- If oid is not
LDAPPasswordExpiringControl.EXPIRING.
LDAPControl.register(java.lang.String, java.lang.Class)
public int getSecondsToExpiration()
java.lang.NumberFormatException
- If the server returned an
undecipherable message. In this case, use getMessage
to
retrieve the message as a string.public java.lang.String getMessage()
public static java.lang.String parseResponse(LDAPControl[] controls)
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.LDAPConnection.getResponseControls()
public java.lang.String toString()
LDAPControl
toString
in class LDAPControl
public static java.lang.String parseResponse(LDAPControl[] controls, java.lang.String type)
You can get the controls returned by the server by using the
getResponseControls
method of the
LDAPConnection
class.
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 forLDAPConnection.getResponseControls()