public class EqualsPreprocessor
extends java.lang.Object
Preprocessor.Processor<T extends Event>| Constructor and Description |
|---|
EqualsPreprocessor(java.lang.String name)
Create the object.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Event> |
addProcessor(T event,
Preprocessor.Processor<T> processor)
Add a new processor.
|
void |
close()
Finish processing of the events and free all allocated resources.
|
protected Preprocessor.Processor |
findProcessor(Event event)
Find appropriate processor for an event.
|
java.lang.String |
getName()
Get the name of the processor.
|
Event |
process(Event event)
Process or preprocess the event.
|
void |
start()
Building of the processor is finished, prepare it to the events
processing.
|
protected final FsmLogger logger
public EqualsPreprocessor(java.lang.String name)
name - the name of the event processorpublic <T extends Event> void addProcessor(T event, Preprocessor.Processor<T> processor) throws FsmException
event - the eventprocessor - the processorFsmException - if the processor is already definedprotected Preprocessor.Processor findProcessor(Event event)
event - the eventpublic Event process(Event event) throws FsmException
Preprocessorprocess in interface Preprocessorprocess in interface Processorevent - the input event, a newly generated event or NullEvent to
ignore the eventFsmException - if something failsNullEventpublic java.lang.String getName()
Processorpublic void start()
throws FsmException
Processorstart in interface ProcessorFsmExceptionProcessor.close()public void close()
ProcessorProcessor.close() should be
avoided. The behavior is not defined and may cause unpredictable
behavior, e.g. NullPointerException.close in interface ProcessorProcessor.start()Copyright 2012-2013 Michal Turek, AnotherFSM.