| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |
This interface defines methods to initialize a filter, and to remove a filter from the proxy server. These are known as life-cycle methods and are called in the following sequence:
init
method.
After a filter is properly initialized, the proxy may route traffic to it. As traffic flows through
each filter point, the proxy invokes the filter's doFilter
method. This method
is defined by protocol-specific extensions to this interface.
destroy
method is called on a filter
instance, the proxy will not route other events to any instance of the filter. After the destroy
method completes, the proxy will release all reference to filter resources so that it is eligible for garbage
collection.
Method Summary | |
---|---|
public
void | init()
Called by the proxy to indicate the filter is being placed into service. .
|
public
void | destroy()
Called by the proxy to indicate the filter is being taken out of service. .
|
Method Detail |
public void init( | ) |
The init
method must complete successfully before the filter can receive any events.
During initialization, the filter instance can throw an Exception
. The filter will not be
placed into active service and will be released by the proxy. The filter's destroy
method
is not invoked as it is considered unsuccessful initialization.
java.lang.Exception
public void destroy( | ) |
This method is only called once all threads within the filter's doFilter
method have
exited or after a timeout period has passed. After the proxy calls this method, it will not call the
doFilter
method again on this filter.
This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.
| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |