Class SessionExpiredCommand
- java.lang.Object
-
- org.pentaho.mantle.client.commands.AbstractCommand
-
- org.pentaho.mantle.client.commands.SessionExpiredCommand
-
- All Implemented Interfaces:
com.google.gwt.core.client.Scheduler.ScheduledCommand
,com.google.gwt.user.client.Command
public class SessionExpiredCommand extends org.pentaho.mantle.client.commands.AbstractCommand
Shows a session expired dialog in a top frame. Won't work on the screens missing the mantle application.
-
-
Constructor Summary
Constructors Constructor Description SessionExpiredCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
getClientTime()
protected String
getCookie(String name)
protected int
getNextCheckShift()
If the session is expired returns a negative value.Integer
getPollingInterval()
protected void
performOperation()
protected void
performOperation(boolean feedback)
protected void
setClientTimeOffset()
Don't be fooled with a System.currentTimeMillis() - in GWT it's a client side time.protected void
setCookie(String name, String value)
void
setPollingInterval(Integer pollingInterval)
-
-
-
Method Detail
-
performOperation
protected void performOperation()
- Specified by:
performOperation
in classorg.pentaho.mantle.client.commands.AbstractCommand
-
performOperation
protected void performOperation(boolean feedback)
- Specified by:
performOperation
in classorg.pentaho.mantle.client.commands.AbstractCommand
-
getPollingInterval
public Integer getPollingInterval()
-
setPollingInterval
public void setPollingInterval(Integer pollingInterval)
-
getNextCheckShift
protected int getNextCheckShift()
If the session is expired returns a negative value. If the session is not expired returns a time left before expiration. If the cookie is not set returns a default polling interval.- Returns:
- time shift for the next check
-
getClientTime
protected long getClientTime()
-
setClientTimeOffset
protected void setClientTimeOffset()
Don't be fooled with a System.currentTimeMillis() - in GWT it's a client side time. To eliminate a possible client clock desynchronization effect we need to calculate an offset between client and server time. Also there always will be a small positive offset equal to a time between the page load nad servlet invocation.In case of any unpredicted situation the offset is set to 0.
-
-