public class DefaultFilterProcessingUnit extends BaseProcessingUnit<FilterAdapter> implements FilterProcessingUnit
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultFilterProcessingUnit.FilterLoopWorker
Processing unit worker to be used in a thread pool.
|
BaseProcessingUnit.EventLoopWorker, BaseProcessingUnit.LoopWorker| Modifier and Type | Field and Description |
|---|---|
protected ProcessableThreadPool |
filterProcessingUnitListenerThreadPoolEntry
The thread pool used by the Filter Processing Unit for listening to the Input Event Queue.
|
eventProcessorRegistrationListener, GET_ITERATION_TIMEOUT, lock| Constructor and Description |
|---|
DefaultFilterProcessingUnit(String name,
SpongeEngine engine,
EventQueue inQueue,
EventQueue outQueue)
Creates a new Filter Processing Unit.
|
| Modifier and Type | Method and Description |
|---|---|
Runnable |
createWorker()
Creates the worker.
|
void |
doShutdown() |
void |
doStartup() |
boolean |
processEvent(Event event)
Processes the specified event.
|
protected boolean |
runFilter(FilterAdapter filterContext,
Event event)
Runs a filter.
|
boolean |
supportsConcurrentListenerThreadPool() |
addProcessor, clearUnusedEventMapping, existsProcessor, getEventProcessorRegistrationListener, getEventProcessors, getInQueue, getOutQueue, getRegisteredProcessorAdapterMap, getThreadPoolManager, invalidateCache, processorChanged, removeAllProcessors, removeProcessor, resolveEventProcessors, setEventProcessorRegistrationListenergetDescription, getEngine, getInternalService, getLabel, getName, getState, isFailed, isNew, isNewOrStartingOrRunning, isRunning, isStarting, isStopping, isTerminated, setDescription, setEngine, setLabel, setName, shutdown, startup, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddProcessor, existsProcessor, getRegisteredProcessorAdapterMap, removeAllProcessors, removeProcessorisFailed, isNew, isRunning, isStarting, isStopping, isTerminated, shutdown, startupgetDescription, getLabel, getName, setDescription, setLabel, setNameprotected ProcessableThreadPool filterProcessingUnitListenerThreadPoolEntry
public DefaultFilterProcessingUnit(String name, SpongeEngine engine, EventQueue inQueue, EventQueue outQueue)
name - processing unit name.engine - the engine.inQueue - input event queue.outQueue - output event queue.public void doStartup()
doStartup in class BaseEngineModulepublic void doShutdown()
doShutdown in class BaseEngineModulepublic Runnable createWorker()
createWorker in interface Processablepublic boolean processEvent(Event event)
event - event.true if this event should be put in the output queue.protected boolean runFilter(FilterAdapter filterContext, Event event)
filterContext - a filter context.event - an event.true if the filter accepts the specified event.public boolean supportsConcurrentListenerThreadPool()
supportsConcurrentListenerThreadPool in interface ProcessingUnit<FilterAdapter>Copyright © 2016–2019 Softelnet. All rights reserved.