public abstract class AutoLogout extends Object
AbstractAutoLogout provides the common implementation that takes care of automatic logout. The
implementation will trigger a call to SecurityCallback.autoLogoutConfirm(Token, int) if there has been no
update made for the specified setLogoutTimeout(int). In addition it will also schedule a logout action in
case that the callback does not respond in time.| Modifier | Constructor and Description |
|---|---|
protected |
AutoLogout(ISecurityFacade facade)
Constructs a new auto logout.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
protected abstract void |
registerForInputEvents()
Register for mouse and keyboard input events.
|
void |
setLogoutConfirmationGrace(int logoutConfirmationGraceInSeconds)
Sets the timeout in seconds how much time the callback has to respond to auto logout confirm call.
|
void |
setLogoutTimeout(int logoutTimeoutInMinutes)
Sets the logout timeout.
|
void |
start()
Starts this auto logout.
|
void |
stop()
Stops this auto logout.
|
protected abstract void |
unRegisterForInputEvents()
Unregister from the mouse and keyboard input events.
|
protected void |
update()
Update the last action time to now.
|
protected AutoLogout(ISecurityFacade facade)
facade - the facade to use for logout, callbacks etc.public void stop()
public void start()
public void setLogoutTimeout(int logoutTimeoutInMinutes)
logoutTimeoutInMinutes - the timeout in minutespublic void setLogoutConfirmationGrace(int logoutConfirmationGraceInSeconds)
logoutConfirmationGraceInSeconds - the time in secondsprotected void update()
protected void finalize()
throws Throwable
protected abstract void unRegisterForInputEvents()
protected abstract void registerForInputEvents()
SecurityFacade.Copyright © 2023 European Spallation Source. All rights reserved.