Skip to content
Markus Sabadello edited this page Feb 4, 2014 · 18 revisions

Interceptors are an important concept of the xdi2-messaging, xdi2-transport and xdi2-transport-http components. They are used as an extensibility mechanism to augment the functionality of an XDI endpoint or of the server itself. Unlike contributors, they typically cover the entire addressing space of an XDI endpoint. For example, they can be used to implement security checks or trigger actions when certain events occur. They may also contribute data to the result of a message, however this is not their main purpose.

Implementation and Use of Interceptors

The interceptors of the xdi2-messaging component can augment the functionality of messaging targets. The interceptors of the xdi2-transport and xdi2-transport-http components can augment functionality related to the request and response of a transport.

A single class can implement multiple interceptor interfaces. For example, an interceptor might need to be called before each message is executed, and when an operation is executed on an XDI statement or an XDI address. Therefore, this interceptor would implement the MessageInterceptor and the TargetInterceptor interfaces.

Interfaces and Classes

Clone this wiki locally