public class EventController extends Object implements LifecycleListener, org.springframework.context.ApplicationContextAware, Runnable
LifecycleListener control the execution phases and,
when the events run out, the application context is notified to shut down.| Constructor and Description |
|---|
EventController(String driverId,
String testRunFqn,
EventService eventService,
EventProducerRegistry eventProducers,
EventProcessorRegistry eventProcessors,
ResultService resultService,
SessionService sessionService,
TestRunLogService logService,
int threadCount)
Construct the controller
|
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Record the application context for shutdown once processing has finished
|
void |
setAssignedEventGracePeriod(int assignedEventGracePeriod)
Override the
default time that an event can
be available on the queue for a specific driver before any other driver can pick it up. |
void |
setDriverIds(String[] driverIds)
Update the list of driver IDs in use.
|
void |
setEventsPerSecondPerThread(int eventsPerSecondPerThread)
Override the
maximum number of events
that can be processed per second per thread. |
void |
start()
Kick the thread off
|
void |
stop() |
public EventController(String driverId, String testRunFqn, EventService eventService, EventProducerRegistry eventProducers, EventProcessorRegistry eventProcessors, ResultService resultService, SessionService sessionService, TestRunLogService logService, int threadCount)
driverId - the ID of the driver controlling the eventstestRunFqn - the fully qualified name of the test runtestDAO - the test DAO for accessing low level datatestRunId - the ID of the test run being controlledeventService - the source of events that will be pushed for executioneventProducers - the registry of producers of eventseventProcessors - the registry of processors for eventsresultService - the service used to store and retrieve event resultssessionService - the service to carry session IDs between eventslogService - the service to record log messages for the end userthreadCount - the number of threads available to the processorpublic void setEventsPerSecondPerThread(int eventsPerSecondPerThread)
maximum number of events
that can be processed per second per thread. This represents a maximum; lower volumes
will be processed at the required rate. Ensure there are enough threads available to
process events at the anticipated rate or change this value.public void setAssignedEventGracePeriod(int assignedEventGracePeriod)
default time that an event can
be available on the queue for a specific driver before any other driver can pick it up.public void setDriverIds(String[] driverIds)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void start()
start in interface LifecycleListenerpublic void stop()
stop in interface LifecycleListenerCopyright © 2005–2018 Alfresco Software. All rights reserved.