public class EventController extends Thread implements org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>, org.springframework.context.ApplicationContextAware, ConfigConstants
Thread.State, Thread.UncaughtExceptionHandlerConfigConstants.RunStateMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITYDEFAULT_RUNSTATE, DEFAULT_SERVER_ID, EXT_JAR, EXT_PROPERTIES, EXT_XML, PATH_CLASSES, PATH_CLUSTER_PROPERTIES, PATH_CLUSTERS, PATH_CONFIG, PATH_JARS, PATH_LOADED, PATH_RUN_PROPERTIES, PATH_RUNS, PATH_SERVER, PATH_SERVERS, PATH_TEST_CONTEXT, PATH_TEST_PROPERTIES, PATH_TESTS, PROP_CLUSTER, PROP_CONTROL_RUN_STATE, PROP_EVENT_PROCESSOR_THREADS, PROP_HTTP_CONNECTION_MAX, PROP_HTTP_CONNECTION_TIMEOUT_MS, PROP_HTTP_SOCKET_TIMEOUT_MS, PROP_HTTP_SOCKET_TTL_MS, PROP_MONGO_AUTOCONNECTRETRY, PROP_MONGO_CONNECTIONSPERHOST, PROP_MONGO_SOCKETTIMEOUT, PROP_MONGO_URI, PROP_MONGO_WRITENUMBER, PROP_SERVER_ID, PROP_TEST_NAME, PROP_TEST_RUN_FQN, PROP_TEST_RUN_NAME, SEPARATOR| Constructor and Description |
|---|
EventController(String serverId,
String testRunFqn,
EventService eventService,
EventProcessorRegistry eventProcessors,
ExecutorService executor,
ResultService resultService)
Construct the controller
|
| Modifier and Type | Method and Description |
|---|---|
void |
onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
The application context is started externally but may be stopped internally
|
void |
run() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Record the application context for shutdown once processing has finished
|
void |
setQueuePollTimeMs(long queuePollTimeMs)
The time between polls of the event provider.
|
void |
setQueueRestAgeMs(long queueRestAgeMs)
Set the time allowed before events can be requeued.
|
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, yieldpublic EventController(String serverId, String testRunFqn, EventService eventService, EventProcessorRegistry eventProcessors, ExecutorService executor, ResultService resultService)
serverId - the server controlling the eventstestRunFqn - the fully qualified name of the test runeventService - the source of events that will be pushed for executioneventProcessors - the registry of processors for eventsexecutor - the service that will provide the worker threads for processingresultService - the service used to store and retrieve event resultspublic void setQueuePollTimeMs(long queuePollTimeMs)
DEFAULT_QUEUE_POLL_TIME_MS.queuePollTimeMs - the time between checks for eventspublic void setQueueRestAgeMs(long queueRestAgeMs)
DEFAULT_QUEUE_REST_AGE_MS.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>Copyright © 2012. All Rights Reserved.