|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.patterns.backgroundtask.www.BackgroundTaskListener
public abstract class BackgroundTaskListener
BackgroundTaskListener is responsible for initialization and starting of tasks which in background, that is without user interaction, periodically execute some functionality. This class is useful for starting such tasks in web environment when the application is running as managed application on the application server and therefore it's lifecycle is controlled by the application server.
| Field Summary | |
|---|---|
protected java.util.Map |
m_tasks
Map with all tasks created by this listener. |
protected java.util.Map |
m_tasksTimers
Timer which periodically execute receiver tasks threads. |
| Constructor Summary | |
|---|---|
BackgroundTaskListener()
Creates a new instance of FileProcessorListener |
|
| Method Summary | |
|---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
|
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
|
protected abstract BackgroundTask |
createTask(int iId)
Create task with given id. |
protected abstract java.lang.String |
getBaseProperty()
Get base property which will be used to construct identification of the task. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map m_tasks
protected java.util.Map m_tasksTimers
| Constructor Detail |
|---|
public BackgroundTaskListener()
| Method Detail |
|---|
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
contextInitialized in interface javax.servlet.ServletContextListenerpublic void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
contextDestroyed in interface javax.servlet.ServletContextListener
protected abstract BackgroundTask createTask(int iId)
throws org.opensubsystems.core.error.OSSException
iId - - id of the task to create
org.opensubsystems.core.error.OSSException - - error during creation of taskprotected abstract java.lang.String getBaseProperty()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||