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
Preprocessor
process
in interface Preprocessor
process
in interface Processor
event
- the input event, a newly generated event or NullEvent to
ignore the eventFsmException
- if something failsNullEvent
public java.lang.String getName()
Processor
public void start() throws FsmException
Processor
start
in interface Processor
FsmException
Processor.close()
public void close()
Processor
Processor.close()
should be
avoided. The behavior is not defined and may cause unpredictable
behavior, e.g. NullPointerException
.close
in interface Processor
Processor.start()
Copyright 2012-2013 Michal Turek, AnotherFSM.