|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ScheduledThreadPoolExecutor
org.directwebremoting.impl.AutoShutdownScheduledThreadPoolExecutor
public class AutoShutdownScheduledThreadPoolExecutor
Just a standard ScheduledThreadPoolExecutor with a single default thread in
the pool (we're not doing heavy scheduling) that is also a
ServletContextListener so the Container
can shut us down.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor |
|---|
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy |
| Constructor Summary | |
|---|---|
AutoShutdownScheduledThreadPoolExecutor()
This is generally used as an event timer, so we don't need more than one thread running at a time. |
|
| Method Summary | |
|---|---|
void |
contextDestroyed()
Called when a ServletContext is being destroyed. |
void |
servletDestroyed()
Called when GenericServlet.destroy() is called. |
| Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor |
|---|
execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, remove, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, shutdown, shutdownNow, submit, submit, submit |
| Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
|---|
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory |
| Methods inherited from class java.util.concurrent.AbstractExecutorService |
|---|
invokeAll, invokeAll, invokeAny, invokeAny |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.concurrent.ExecutorService |
|---|
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated |
| Constructor Detail |
|---|
public AutoShutdownScheduledThreadPoolExecutor()
| Method Detail |
|---|
public void contextDestroyed()
UninitializingBeanServletContext is being destroyed.
DWR finds out about this destruction if (and only if) in web.xml there
is a DwrListener registered.
This happens before the GenericServlet.destroy()
is called.
If DwrListener is not registered, this will not happen
This method should only be used when we need to take action to enable the servlet to stop cleanly. Typically this will be restricted to stopping reverse ajax threads.
contextDestroyed in interface UninitializingBeanpublic void servletDestroyed()
UninitializingBeanGenericServlet.destroy() is called.
This event is the preferred time to close resources that don't require
all connections to be closed. The servletDestroy method is far more
likely to be called.
servletDestroyed in interface UninitializingBean
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||