public class AuditEventProcessorPipeline extends Object implements EventProcessorPipeline<AuditEvent>
This singleton class encapsulates a global, static queue of event processor instances. The processors can be registered using a priority, affecting their execution order in the queue.
For each incoming event, this queue is processed before the event is stored within the event storage.
In addition to the processors, this queue also provides a place for registering event-listeners. These are notified after all processors have been applied to the event.
| Modifier and Type | Class and Description |
|---|---|
class |
AuditEventProcessorPipeline.Priority |
| Modifier and Type | Field and Description |
|---|---|
static Double |
DEFAULT_PRIORITY |
| Constructor and Description |
|---|
AuditEventProcessorPipeline() |
| Modifier and Type | Method and Description |
|---|---|
List<EventListener<AuditEvent>> |
getListeners() |
Double |
getPriority(EventProcessor<AuditEvent> proc) |
List<EventProcessor<AuditEvent>> |
getProcessors() |
void |
logInfo() |
void |
process(AuditEvent event) |
AuditEvent |
processEvent(AuditEvent event)
This method applies all registered processors to the specified event.
|
void |
register(Double priority,
EventProcessor<AuditEvent> proc)
Register a new event processor in this pipeline.
|
void |
registerListener(EventListener<AuditEvent> l) |
void |
unregister(EventProcessor<AuditEvent> proc)
Unregister the given processor from this pipeline.
|
void |
unregisterEventProcessor(EventProcessor<AuditEvent> p)
This method is used to unregister an event-processor from the
AuditStorage
|
void |
unregisterListener(EventListener<AuditEvent> l) |
public static final Double DEFAULT_PRIORITY
public AuditEvent processEvent(AuditEvent event) throws EventProcessorException
event - EventProcessorExceptionpublic void unregisterEventProcessor(EventProcessor<AuditEvent> p)
p - public void unregisterListener(EventListener<AuditEvent> l)
public void registerListener(EventListener<AuditEvent> l)
public void logInfo()
public void process(AuditEvent event) throws EventProcessorException
process in interface EventProcessorPipeline<AuditEvent>EventProcessorExceptionorg.jwall.web.audit.console.event.EventProcessorPipeline#process(org.jwall.audit.Event)public List<EventProcessor<AuditEvent>> getProcessors()
public List<EventListener<AuditEvent>> getListeners()
public void unregister(EventProcessor<AuditEvent> proc)
EventProcessorPipelineunregister in interface EventProcessorPipeline<AuditEvent>proc - The processor to remove from the pipeline.org.jwall.web.audit.console.event.EventProcessorPipeline#unregister(org.jwall.audit.EventProcessor)public void register(Double priority, EventProcessor<AuditEvent> proc)
EventProcessorPipelineregister in interface EventProcessorPipeline<AuditEvent>priority - The priority with which this processor is inserted into the pipeline.proc - The new processor to be added to the pipeline.org.jwall.web.audit.console.event.EventProcessorPipeline#register(java.lang.Double,
org.jwall.audit.EventProcessor)public Double getPriority(EventProcessor<AuditEvent> proc)
getPriority in interface EventProcessorPipeline<AuditEvent>Copyright © 2013 jwall.org. All Rights Reserved.