The Filter Factory component of the filtering system is responsible for creating Filter objects. Each type of filter in the system is created by a single factory. This factory model is based on the factory method design pattern[9]. The factory method design pattern defines an interface which is used to encapsulate the knowledge of how objects are created. Instead of creating an object directly, a factory method is called to create the object. Any details related to how the object is created and initialized are contained within the factory method. The term "factory" is used because the method is responsible for "manufacturing" an object.
The factory design pattern is used by the filtering system to allow different types of filters to be created easily and to provide a mechanism for filters to store persistent information between executions. Without a filter factory, any data obtained by the filter during its processing would be lost after execution. With a factory, a filter can store its data in the factory and retrieve it later during another transaction.