public class CreateSessionsEventProcessor extends AbstractEventProcessor
Note that derivations of this class can be used to generate the desired data for each of the raised events.
#setEventNameRaiseEvents(String): Self-triggering eventoutputEventName: Obtains data from getNextEventData()| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_COMPLETED_SESSION_COUNT |
static String |
KEY_OUTPUT_EVENTS_RAISED |
DEFAULT_AUTO_CLOSE_SESSION_ID, DEFAULT_AUTO_PROPAGATE_SESSION_ID, DEFAULT_CHART, DEFAULT_WARN_DELAY, logger| Constructor and Description |
|---|
CreateSessionsEventProcessor(SessionService sessionService,
String outputEventName,
int concurrentSessions,
int totalSessions)
Constructor with essential values
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
getNextEventData()
Get data to provide for each event raised.
|
EventResult |
processEvent(Event event)
Process an event.
|
void |
setCheckPeriod(long checkPeriod)
Override the
default time between session count checks |
void |
setEventNameCreateSessions(String eventNameCreateSessions)
Override the
default name for repeats |
void |
setTimeBetweenSessions(long timeBetweenSessions)
Override the
default time between sessions |
getName, getWarnDelay, isAutoCloseSessionId, isAutoPropagateSessionId, isChart, processEvent, register, resumeTimer, setAutoCloseSessionId, setAutoPropagateSessionId, setBeanName, setChart, setEventName, setEventNames, setRegistry, setWarnDelay, stopTimer, suspendTimer, toStringpublic static final String KEY_OUTPUT_EVENTS_RAISED
public static final String KEY_COMPLETED_SESSION_COUNT
public CreateSessionsEventProcessor(SessionService sessionService, String outputEventName, int concurrentSessions, int totalSessions)
sessionService - session informationoutputEventName - the name of the event to emitconcurrentSessions - the number of concurrent sessions to maintaintotalSessions - the maxiumum number of sessions to createpublic void setEventNameCreateSessions(String eventNameCreateSessions)
default name for repeatspublic void setCheckPeriod(long checkPeriod)
default time between session count checkspublic void setTimeBetweenSessions(long timeBetweenSessions)
default time between sessionspublic EventResult processEvent(Event event)
AbstractEventProcessorprocessEvent in class AbstractEventProcessorevent - the event (along with associated data)AbstractEventProcessor.suspendTimer(),
AbstractEventProcessor.resumeTimer(),
AbstractEventProcessor.stopTimer()protected Object getNextEventData()
DBObject for complicated data transferCopyright © 2005–2018 Alfresco Software. All rights reserved.