public class DefaultFilterProcessingUnit extends BaseProcessingUnit<org.openksavi.sponge.filter.FilterAdapter> implements org.openksavi.sponge.engine.processing.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 org.openksavi.sponge.engine.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,
org.openksavi.sponge.engine.Engine engine,
org.openksavi.sponge.engine.event.EventQueue inQueue,
org.openksavi.sponge.engine.event.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(org.openksavi.sponge.event.Event event)
Processes the specified event.
|
protected boolean |
runFilter(org.openksavi.sponge.filter.FilterAdapter filterContext,
org.openksavi.sponge.event.Event event)
Runs a filter.
|
boolean |
supportsConcurrentListenerThreadPool() |
addProcessor, clearUnusedEventMapping, existsProcessor, getEventProcessorRegistrationListener, getEventProcessors, getInQueue, getOutQueue, getRegisteredProcessorAdapterMap, getThreadPoolManager, invalidateCache, processorChanged, removeAllProcessors, removeProcessor, resolveEventProcessors, setEventProcessorRegistrationListenergetEngine, getName, getService, getState, isFailed, isNew, isNewOrStartingOrRunning, isRunning, isStarting, isStopping, isTerminated, setEngine, setName, shutdown, startup, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddProcessor, existsProcessor, getRegisteredProcessorAdapterMap, removeAllProcessors, removeProcessorprotected org.openksavi.sponge.engine.ProcessableThreadPool filterProcessingUnitListenerThreadPoolEntry
public DefaultFilterProcessingUnit(String name, org.openksavi.sponge.engine.Engine engine, org.openksavi.sponge.engine.event.EventQueue inQueue, org.openksavi.sponge.engine.event.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 org.openksavi.sponge.util.Processablepublic boolean processEvent(org.openksavi.sponge.event.Event event)
event - event.true if this event should be put in the output queue.protected boolean runFilter(org.openksavi.sponge.filter.FilterAdapter filterContext,
org.openksavi.sponge.event.Event event)
filterContext - a filter context.event - an event.true if the filter accepts the specified event.public boolean supportsConcurrentListenerThreadPool()
supportsConcurrentListenerThreadPool in interface org.openksavi.sponge.engine.processing.ProcessingUnit<org.openksavi.sponge.filter.FilterAdapter>Copyright © 2016–2017 Softelnet. All rights reserved.