|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
com.ibm.btt.cs.html.util.ProcessorExpirationCheckManager
public class ProcessorExpirationCheckManager
This thread has the responsability of find the expired sessions. A session is considered expired as long as has reached a timeout from its last request processed. This timeout is an attribute of the CSServer Service. The thread remains asleep during a given period of time, then performs the check. This process repeats until the stop method is called. The time that the thread will sleep is an attribute of CSServer called timeBetweenSessionCheck. When a session has expired, two actions are performed: marking it as expired, this changing the expired value of the session entry to true, and firing an CSInactivityClientEvent.
Field Summary | |
---|---|
protected static CSProcessorInactivityListener |
aCSProcessorInactivityListener
Contains the listeners of the CSProcessorInactivityEvent events. |
protected static long |
timeBetweenChecks
Indicates the thread the time it must sleep between a checking and the next one. |
Constructor Summary | |
---|---|
ProcessorExpirationCheckManager()
|
Method Summary | |
---|---|
static void |
addCSProcessorInactivityListener(CSProcessorInactivityListener listener)
set the CSProcessorInactivityListener |
void |
checkExpiredSessions()
When an expired session is found, fire an event and mark the session as expired. |
void |
fireHandleCSProcessorInactivityEvent(CSProcessorInactivityEvent event)
fire the CSProcessorInactivityEvent and use the listener to handle it |
static void |
performHouseKeeping(CSProcessorInactivityEvent event)
remove the processor from the processor manager |
void |
run()
Run method of the thread. |
static void |
startExpirationCheckTask(long timeBetweenChecksValue)
start to check the expired processor |
static void |
stopThread()
Stops the thread. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static long timeBetweenChecks
protected static transient CSProcessorInactivityListener aCSProcessorInactivityListener
Constructor Detail |
---|
public ProcessorExpirationCheckManager()
Method Detail |
---|
public static void addCSProcessorInactivityListener(CSProcessorInactivityListener listener)
listener
- CSProcessorInactivityListenerpublic static void startExpirationCheckTask(long timeBetweenChecksValue)
timeBetweenChecksValue
- the time in milliseconds to check the expired processorpublic void run()
run
in interface java.lang.Runnable
run
in class java.util.TimerTask
public static void stopThread()
public void checkExpiredSessions() throws DSEInvalidRequestException, DSEObjectNotFoundException
DSEInvalidRequestException
DSEObjectNotFoundException
public static void performHouseKeeping(CSProcessorInactivityEvent event) throws DSEInvalidRequestException
event
- CSProcessorInactivityEvent
DSEInvalidRequestException
- if error occurspublic void fireHandleCSProcessorInactivityEvent(CSProcessorInactivityEvent event)
event
- CSProcessorInactivityEvent event
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |