Class FilterChain<InputType extends ChainContextContainer<InputType>>

java.lang.Object
org.chenile.owiz.impl.CommandBase<InputType>
org.chenile.owiz.impl.Chain<InputType>
org.chenile.owiz.impl.FilterChain<InputType>
Type Parameters:
InputType - .
All Implemented Interfaces:
AttachableCommand<InputType>, BypassableCommand<InputType>, Command<InputType>, OrchestrationAware<InputType>

public class FilterChain<InputType extends ChainContextContainer<InputType>> extends Chain<InputType> implements Command<InputType>, AttachableCommand<InputType>

A variation of the Chain for AOP like surround processing. In this implementation, the filter chain manufactures a chain of commands with each command having to continue the chain explicitly or return. This allows commands to implement surround processing. Normal chain does not allow "wrapping" functionality which is required for surround interception.

The InputType passed must have a way of continuing the chain by wrapping the ChainContext. Hence it needs to implement ChainContextContainer. All commands called by the chain can then assume that the context implements the interface. The ChainContext can then be extracted from the InputType and the doContinue() method can then be called by the command.

Author:
Raja Shankar Kolluru