Top Description Fields Constructors Methods
org.eclipse.jetty.session

public Class SessionInactivityTimer

extends Object
Class Inheritance
Imports
java.util.concurrent.TimeUnit, org.eclipse.jetty.io.CyclicTimeout, org.eclipse.jetty.util.thread.AutoLock, .Scheduler, org.slf4j.Logger, .LoggerFactory

SessionInactivityTimer Each Session has a timer associated with it that fires whenever it has been idle (ie not accessed by a request) for a configurable amount of time, or the Session expires. The timer is only scheduled when all Requests have exited the Session. If a request enters a Session whose timer is active, it is cancelled.

Field Summary

Modifier and TypeField and Description
private final Scheduler
private final ManagedSession
private final SessionManager
private final CyclicTimeout
private static final Logger

Constructor Summary

AccessConstructor and Description
public
SessionInactivityTimer(SessionManager sessionManager, ManagedSession session, Scheduler scheduler)

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
schedule(long
the timeout to set; -1 means that the timer will not be scheduled
time
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_schedulerback to summary
private final Scheduler _scheduler
_sessionback to summary
private final ManagedSession _session
_sessionManagerback to summary
private final SessionManager _sessionManager
_timerback to summary
private final CyclicTimeout _timer
LOGback to summary
private static final Logger LOG

Constructor Detail

SessionInactivityTimerback to summary
public SessionInactivityTimer(SessionManager sessionManager, ManagedSession session, Scheduler scheduler)

Method Detail

cancelback to summary
public void cancel()
destroyback to summary
public void destroy()
scheduleback to summary
public void schedule(long time)
Parameters
time:long

the timeout to set; -1 means that the timer will not be scheduled