The Full Wiki

More info on Interceptor pattern

Interceptor pattern: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


From Wikipedia, the free encyclopedia

In the field of software development, an interceptor pattern is a software design pattern that is used when software systems or frameworks want to offer a way to change, or augment, their usual processing cycle. For example, a (simplified) typical processing sequence for a web-server is to receive a URI from the browser, map it to a file on disk, open the file and send its contents to the browser. Any of these steps could be replaced or changed, i.e. by replacing the way URIs are mapped to filenames, or by inserting a new step which processes the files contents.

Key aspects of the pattern are that the change is transparent and used automatically. In essence, the rest of the systems does not have to know something has been added or changed and can keep working as before. To facilitate this, a predefined interface for extension has to be implemented, some kind of dispatching mechanism is required where interceptors are registered (this may be dynamic, at runtime, or static, e.g. through configuration files) and context objects are provided, which allow access to the frameworks internal state[1].

Uses & Context

Typical users of this pattern are web-servers[2] (as mentioned above), object-[3] and message-oriented middleware[4]


  1. ^ Schmidt, Stal, Rohnert & Buschmann: "Pattern-Oriented Software Architecture Vol.2: Patterns for Concurrent and Networked Objects", pp. 109--140, April 2001
  2. ^ Apache Software Foundation: Tomcat 6.0 Channel Interceptor Reference, acessed 2009-Nov-24
  3. ^ OMG, "CORBA v3.1, Part I: Interfaces", Chapter 16 "Portable Interceptors", January 2008
  4. ^ E. Curry, D. Chambers, and G. Lyons, “Extending Message-Oriented Middleware using Interception”, presented at Third International Workshop on Distributed Event-Based Systems (DEBS '04), ICSE '04, Edinburgh, Scotland, UK, 2004.


Got something to say? Make a comment.
Your name
Your email address