-
Notifications
You must be signed in to change notification settings - Fork 17
Interceptors
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.
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.
- xdi2.messaging.target.interceptor.Interceptor: Interceptor interface.
- xdi2.messaging.target.interceptor.MessagingTargetInterceptor: Interceptor that is executed when a messaging target is initialized and shut down.
- xdi2.messaging.target.interceptor.MessageEnvelopeInterceptor: Interceptor that is executed before and after a message envelope is executed, as well as when an exception occurs while executing the message envelope.
- xdi2.messaging.target.interceptor.MessageInterceptor: Interceptor that is executed before and after a message is executed.
- xdi2.messaging.target.interceptor.OperationInterceptor: Interceptor that is executed before and after an operation is executed.
- xdi2.messaging.target.interceptor.TargetInterceptor: Interceptor that is executed when an operation is executed on an XDI statement or an XDI address.
- xdi2.messaging.target.interceptor.ResultInterceptor: Interceptor that is executed on a message result after a message envelope has been executed.
- xdi2.server.interceptor.HttpTransportInterceptor: Interceptor that is executed when the HTTP Transport is initialized, destroyed, or when it receives an incoming HTTP request.
This work is licensed under a Creative Commons Attribution 4.0 International License.