Package com.iizix.event
Class PostProcessing
java.lang.Object
com.iizix.event.PostProcessing
- All Implemented Interfaces:
- IPostEventProcessing
The post processor implementation.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- PostProcessing- (GProp<?> initialDispatcher) Constructor with initial dispatcher.
- Method SummaryModifier and TypeMethodDescription- void- addPostProcessor- (EventListener postProcessor) Adds a post-event processor that will be called when the event has completed its notification process.- voidExecutes all post processors for a dispatcher.- getPostProcessors- (GProp<?> dispatcher) Gets the post-processors.- boolean- hasPostProcessors- (GProp<?> dispatcher) Checks for presence of post processors.- void- setInitialProperty- (GProp<?> initialDispatcher) Assigns the initial sender property that should perform post processing of events.
- Constructor Details- PostProcessingConstructor with initial dispatcher.- Parameters:
- initialDispatcher- The initial dispatcher, can be null.
 
 
- Method Details- setInitialPropertyAssigns the initial sender property that should perform post processing of events. This method should only be called from the initial GProp that sends the event the first time. This is done from the GProp.onEvent method and should not be called elsewhere.- Specified by:
- setInitialPropertyin interface- IPostEventProcessing
- Parameters:
- initialDispatcher- The initial dispatcher.
 
- addPostProcessorAdds a post-event processor that will be called when the event has completed its notification process. This method can be called at any time during the event notification phase, but calls to this method when post-processing is executing is not going to change the post-processors, thus will the- postProcessornot be called.- Note: the post-processors are called no matter if the event has been canceled, so the processor may have to check the cancel state. - Calling this method with the same - postProcessormore than once does not add it again.- Specified by:
- addPostProcessorin interface- IPostEventProcessing
- Parameters:
- postProcessor- Processor to add.
- Throws:
- NullPointerException- If the- postProcessoris null.
 
- getPostProcessorsGets the post-processors.- Specified by:
- getPostProcessorsin interface- IPostEventProcessing
- Parameters:
- dispatcher- The property retrieving the post-processors, null for none.
- Returns:
- An array of the post-processors to call after all normal event notification, null for none.
 
- hasPostProcessorsChecks for presence of post processors.- Parameters:
- dispatcher- The property retrieving the post-processors, null for none.
- Returns:
- true if post processors are present, false otherwise.
 
- executeExecutes all post processors for a dispatcher.- Parameters:
- dispatcher- The property retrieving the post-processors, null for none.
- event- Event to dispatch to the post processors.
- Throws:
- NullPointerException- if the dispatcher or event is null.