Class LockOutFlag
java.lang.Object
org.jivesoftware.openfire.lockout.LockOutFlag
- All Implemented Interfaces:
Externalizable,Serializable,Cacheable
A LockOutFlag represents the current disabled status set on a particular user account.
It can have a start and end time (a period of time in which the disabled status is active).
- Author:
- Daniel Henninger
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor added for Externalizable.LockOutFlag(String username, Date startTime, Date endTime) Creates a representation of a lock out flag, including which user it is attached to and an optional start and end time. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the approximate size of the Object in bytes.Retrieves the date/time at which the account this flag references will stop having a disabled status.Retrieves the date/time at which the account this flag references will begin having a disabled status.Retrieves the username that this lock out flag is attached to.voidvoidsetEndTime(Date endTime) Sets the end time for when the account will be reenabled, or null if manual reenable required.voidsetStartTime(Date startTime) Sets the start time for when the account will be disabled, or null if immediate.void
-
Constructor Details
-
LockOutFlag
public LockOutFlag()Constructor added for Externalizable. Do not use this constructor. -
LockOutFlag
Creates a representation of a lock out flag, including which user it is attached to and an optional start and end time.- Parameters:
username- User the flag is attached to.startTime- Optional start time for the disabled status to start.endTime- Optional end time for the disabled status to end.
-
-
Method Details
-
getUsername
Retrieves the username that this lock out flag is attached to.- Returns:
- Username the flag is attached to.
-
getStartTime
Retrieves the date/time at which the account this flag references will begin having a disabled status. This can be null if there is no start time set, meaning that the start time is immediate.- Returns:
- The Date when the disabled status will start, or null for immediately.
-
setStartTime
Sets the start time for when the account will be disabled, or null if immediate.- Parameters:
startTime- Date when the disabled status will start, or null for immediately.
-
getEndTime
Retrieves the date/time at which the account this flag references will stop having a disabled status. This can be null if the disabled status is to continue until manually disabled.- Returns:
- The Date when the disabled status will end, or null for "forever".
-
setEndTime
Sets the end time for when the account will be reenabled, or null if manual reenable required.- Parameters:
endTime- Date when the disabled status will end, or null for forever.
-
getCachedSize
public int getCachedSize()Description copied from interface:CacheableReturns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.- Specified by:
getCachedSizein interfaceCacheable- Returns:
- the size of the Object in bytes.
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-