Module to store filter classes.
The filters are sequentially applied in the same order in wich they were specified in the configuration file, unless they were explicitly set as parallel.
Abstract class. All filters should inherit from it or from other class that inherits.
Constructor.
Each filter receives everything in its corresponding filter section of the XML configuration file as the parameter configurationsDictionary.
Extract and store configurations.
If some configuration needs any kind of pre-processing, it is done here. Extend this method if you need to pre-process custom configuration options.
Execute per client initialization procedures.
This method is called every time a connection to a new client is opened, allowing to execute initialization code on a per client basis (which differs from __init__() that is called when the server instantiate the filter, i.e., __init__() is called just one time for the whole period of execution of the program).
Process resource information before it is sent to a client.
Process information sent by clients after a resource has been crawled.
Execute per client finalization procedures.
This method is called every time a connection to a client is closed, allowing to execute finalization code on a per client basis. It is the counterpart of setup().
Execute program finalization procedures (similar to a destructor).
This method is called when the server is shut down, allowing to execute finalization code in a global manner. It is intended to be the counterpart of __init__(), but differs from __del__() in that it is not bounded to the live of the filter object itself, but rather to the span of execution time of the server.
Bases: filters.BaseFilter
Save resources sent by clients in a user specified location.
This post-processing olny filter makes use of the persistence infrastructure to save resources sent by clients. The location where the resources are stored can be specified in the XML configuration file just setting up the persistence handler to be used.