Class SessionWatchdog


  • public class SessionWatchdog
    extends java.lang.Object
    The SessionWatchdog is responsible to perform certain actions for a session at a specific point in time. Currently following actions are performed:
    • Sessions which could not be closed after session splitting will be closed after a certain grace period.
    • Session proxies which require splitting after a maximum session duration or by idle timeout
    • Method Detail

      • initialize

        public void initialize()
      • shutdown

        public void shutdown()
      • closeOrEnqueueForClosing

        public void closeOrEnqueueForClosing​(SessionImpl session,
                                             int closeGracePeriodInMillis)
        Tries to close/end the given session or enqueues it for closing if closing was not possible
        Parameters:
        session - the session to be closed or enqueued for closing.
        closeGracePeriodInMillis - the grace period after which the session is to be closed for good.
      • dequeueFromClosing

        public void dequeueFromClosing​(SessionImpl session)
        Removes the given session for auto-closing from this watchdog
        Parameters:
        session - the session to be removed.
      • addToSplitByTimeout

        public void addToSplitByTimeout​(SessionProxyImpl sessionProxy)
        Adds the given session proxy so that it will be automatically split the underlying session when the idle timeout or the max session time is reached.
        Parameters:
        sessionProxy - the session proxy to be added.
      • removeFromSplitByTimeout

        public void removeFromSplitByTimeout​(SessionProxyImpl sessionProxy)
        Removes the given session proxy from automatically splitting it after idle or session max time expired.
        Parameters:
        sessionProxy - the session proxy to be removed.