Package org.opends.server.controls
Class PasswordExpiringControl
- java.lang.Object
-
- org.opends.server.types.Control
-
- org.opends.server.controls.PasswordExpiringControl
-
public class PasswordExpiringControl extends Control
This class implements the Netscape password expiring control, which serves as a warning to clients that the user's password is about to expire. The only element contained in the control value is a string representation of the number of seconds until expiration.
-
-
Field Summary
Fields Modifier and Type Field Description static ControlDecoder<PasswordExpiringControl>DECODERThe Control Decoder that can be used to decode this control.
-
Constructor Summary
Constructors Constructor Description PasswordExpiringControl(boolean isCritical, int secondsUntilExpiration)Creates a new instance of the password expiring control with the provided information.PasswordExpiringControl(int secondsUntilExpiration)Creates a new instance of the password expiring control with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetSecondsUntilExpiration()Retrieves the length of time in seconds until the password actually expires.voidtoString(StringBuilder buffer)Appends a string representation of this password expiring control to the provided buffer.voidwriteValue(ASN1Writer writer)Writes this control's value to an ASN.1 writer.-
Methods inherited from class org.opends.server.types.Control
getOID, isCritical, toString, write
-
-
-
-
Field Detail
-
DECODER
public static final ControlDecoder<PasswordExpiringControl> DECODER
The Control Decoder that can be used to decode this control.
-
-
Constructor Detail
-
PasswordExpiringControl
public PasswordExpiringControl(int secondsUntilExpiration)
Creates a new instance of the password expiring control with the provided information.- Parameters:
secondsUntilExpiration- The length of time in seconds until the password actually expires.
-
PasswordExpiringControl
public PasswordExpiringControl(boolean isCritical, int secondsUntilExpiration)Creates a new instance of the password expiring control with the provided information.- Parameters:
isCritical- Indicates whether support for this control should be considered a critical part of the client processing.secondsUntilExpiration- The length of time in seconds until the password actually expires.
-
-
Method Detail
-
writeValue
public void writeValue(ASN1Writer writer) throws IOException
Description copied from class:ControlWrites this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.- Specified by:
writeValuein classControl- Parameters:
writer- The ASN.1 writer to use.- Throws:
IOException- If a problem occurs while writing to the stream.
-
getSecondsUntilExpiration
public int getSecondsUntilExpiration()
Retrieves the length of time in seconds until the password actually expires.- Returns:
- The length of time in seconds until the password actually expires.
-
toString
public void toString(StringBuilder buffer)
Appends a string representation of this password expiring control to the provided buffer.
-
-