com.silverpeas.workflow.engine
Class WorkflowEngineThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.silverpeas.workflow.engine.WorkflowEngineThread
All Implemented Interfaces:
Runnable

public class WorkflowEngineThread
extends Thread

A thread WorkflowEngineThread process in the background a batch of events sent to workflow All the public methods are static, so only one thread runs and processes the requests.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static void addQuestionRequest(QuestionEvent event)
          Add a request 'QuestionEvent'
static void addResponseRequest(ResponseEvent event)
          Add a request 'ResponseEvent'
static void addTaskDoneRequest(TaskDoneEvent event)
          Add a request 'TaskDoneEvent'
static void addTaskSavedRequest(TaskSavedEvent event)
          Add a request 'TaskSavedEvent'
static void addTimeoutRequest(TimeoutEvent event)
          Add a request 'TimeoutEvent'
 void run()
          Process all the requests.
static void starts()
          Builds and starts the thread which will process all the requests.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

starts

public static void starts()
Builds and starts the thread which will process all the requests. This method is synchonized on the requests queue in order to guarantee that only one WorkflowEngineThread is running.


addTaskDoneRequest

public static void addTaskDoneRequest(TaskDoneEvent event)
Add a request 'TaskDoneEvent'


addTaskSavedRequest

public static void addTaskSavedRequest(TaskSavedEvent event)
Add a request 'TaskSavedEvent'


addQuestionRequest

public static void addQuestionRequest(QuestionEvent event)
Add a request 'QuestionEvent'


addResponseRequest

public static void addResponseRequest(ResponseEvent event)
Add a request 'ResponseEvent'


addTimeoutRequest

public static void addTimeoutRequest(TimeoutEvent event)
Add a request 'TimeoutEvent'


run

public void run()
Process all the requests. This method should be private but is already declared public in the base class Thread.

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2016 Silverpeas. All Rights Reserved.