This class is used to support user inactivity timeout for active components, like af:poll and Active Data Service (ADS). If a user has been inactive for a period of user inactivity timeout, it stops active components instacting with server to allow application's session to time out so that server resources can be released timely. This class provides functions to check whetehr the feature is enabled, start/restart user inactivity timeout timer, calculate the timeout value, stop active component sending any request to server when user is inactive and inactivity times out, and resume active components if user interacts again before session times out. The timeout value is specified in web.xml file as a servlet context paramter, "oracle.adf.view.rich.poll.TIMEOUT". Its default value is 10 minutes. The feature is disabled if its value is -1. af:poll component's timeout property overrides the value defined in web.xml. An instance of this class in a page should only be created if there is af:poll component or the page supports ADS. If it is enabled, a user inactivity timeout timer starts when the page is loaded. When it times out, it stops active components and starts session timeout warning timer. If user is active again before session times out, it resumes active components and a new timer is started.
Method Summary
|
private Object |
_applyPollTimeoutStyle()
-
Callback function to apply the "poll timeout" style to all components that were updated by the LAST poll, before the <af:poll> component timed out, due to user inactivity.
|
private Object |
_calculatePollingTimeoutInterval(Object interval)
-
Calculates the global "timeout interval" for the af:poll components.
|
private HTMLElement |
_createPollingTimeoutLayerElement(HTMLElement element)
-
Helper function which creates a (simple) layer/DIV element to be placed ontop of those components that are no longer being updated, once the <af:poll> component has been "timed out".
|
private Object |
_forceADSStop()
-
Forces ADS to stop sending polling/reconnecting requests down to the server due to user inactivity timeout.
|
private Object |
_forceComponentStop()
-
Callback function which forces all <af:poll> components and ADS to stop interacting with server since client timed out due to user inactivity.
|
private Object |
_forcePollingComponentStop()
-
Forces all <af:poll> components to stop sending polling requests down to the server due to user inactivity timeout.
|
public boolean |
hasTimedOut()
-
Helper method to request the "state" of the user inactivity timeout
|
protected Object |
Init()
-
Create an instance of an AdfUserInactivityTimeoutHelper
|
protected static Object |
InitClass()
-
Initializes the AdfUserInactivityTimeoutHelper class
|
public Object |
initializeTimeout(Object interval)
-
Called when a page is loaded or on PPR to calculate the global timeout interval of the embedding PAGE and schedules the timeout callback, if needed.
|
public boolean |
isTimeoutEnabled()
-
Check whether user inactivity timeout is enabled
|
public Object |
registerPollComponent(Object component)
-
Hook for the PollPeer to register its component to keep track of its ID and timeout value.
|
private Object |
_removePollingTimeoutLayer()
-
Removes the "polling timeout layer" HTML elements and removes the "polling timeout" styles from those components that are no longer updated, once the polling times out.
|
private Object |
_rescheduleOrScheduleTimerIfNeeded()
-
Helper function to cancel and reschedule the timer callback.
|
Object |
__resetTimeoutHandler(Object event)
-
This function is called by _redistribute().
|
public Object |
unregisterPollComponent(Object component)
-
Called by the ComponentRemoved of the Poll Peer to trigger the unregister of the removed component.
|