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.AbstractCommandShows 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 longgetClientTime()protected StringgetCookie(String name)protected intgetNextCheckShift()If the session is expired returns a negative value.IntegergetPollingInterval()protected voidperformOperation()protected voidperformOperation(boolean feedback)protected voidsetClientTimeOffset()Don't be fooled with a System.currentTimeMillis() - in GWT it's a client side time.protected voidsetCookie(String name, String value)voidsetPollingInterval(Integer pollingInterval)
-
-
-
Method Detail
-
performOperation
protected void performOperation()
- Specified by:
performOperationin classorg.pentaho.mantle.client.commands.AbstractCommand
-
performOperation
protected void performOperation(boolean feedback)
- Specified by:
performOperationin 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.
-
-