The Intercepting Filter (I)
10 February 2008In a client-server environment, a system must be able to handle client requests with different processing needs before sending them to server.
- The system receives requests from a client with different protocols such as HTTP, FTP, SMTP etc.
- The system must authorize and authenticate some requests, where as for some requests it is not necessary to authorize and authenticate requests and system can handle such requests directly.
- From certain requests and responses a system must add or remove some information.
For an efficient system, these requests and responses must be pre-processed and post-processed in a proper way. In addition to that this processing must be independent from the rest of the system. The design pattern Intercepting Filter helps in efficiently handle this all. A filter is an object that intercepts communication between client and server and then filters the data being passed between them.
The Intercepting Filter separates request/response processing from the rest of the system by creating filters. The design pattern Intercepting Filter comprises of several javax.servlet. Filter objects that process requests and response. There can be a single interface for transforming requests and responses when a Intercepting Filter is used. Intercepting Filter provides a standard way to modify requests and responses when needed. It also provides standardized and centralized pre-processing and post processing of requests and responses.
Do follow the next post on this.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: The Intercepting Filter (I)