module documentation
InterceptorManager class for managing interceptors.
| Class | |
Base class for interceptors. Interceptors are classes that can define methods decorated with @intercept to intercept requests at different phases (e.g. pre-processing, post-processing) and for different operations and resource types. |
| Class | |
Data class to hold information about an interceptor handler method. |
| Class | |
Manager for interceptors. This class is responsible for registering interceptors and calling the appropriate interceptor handlers when a request is processed by the CSE. It maintains a registry of all interceptor handlers and their metadata, and uses this registry to find and call the appropriate handlers for each request. |
| Class | |
Enumeration of interception phases. |
| Function | intercept |
Decorator to mark a method as an interceptor handler. The decorated method will be registered with the InterceptorManager when the interceptor class is instantiated. |
| Type Alias | |
A tuple of (phase, operation, resource) to filter interceptor handlers. Each element can be a specific value or None to match all. This is used as a key for caching interceptor handler lookups in the InterceptorManager. |
| Variable | interceptor |
The global interceptor manager instance. This is a singleton instance. |
| Variable | interceptor |
Maps interceptor handler functions to their plugin names for management purposes. |
def intercept(phase:
Phase | list[ Phase] | None = Phase.ALL, operation: Operation | list[ Operation] | None = Operation.ALL, resource: ResourceTypes | list[ ResourceTypes] | None = ResourceTypes.ALL, priority: int | None = 50) -> Callable:
¶
Decorator to mark a method as an interceptor handler. The decorated method will be registered with the InterceptorManager when the interceptor class is instantiated.
| Parameters | |
phase:Phase | list[ | The phase at which to intercept (pre, post, or all). |
operation:Operation | list[ | The operation to intercept (create, retrieve, update, delete, notify, discovery, or all). |
resource:ResourceTypes | list[ | The resource type to intercept (e.g. container, contentInstance, etc. or all). |
priority:int | None | The priority of the interceptor handler (lower numbers are executed first). Default is 50. |
| Returns | |
Callable | A decorator function that marks the method as an interceptor handler with the specified metadata. |
InterceptorFilter =
¶
A tuple of (phase, operation, resource) to filter interceptor handlers. Each element can be a specific value or None to match all. This is used as a key for caching interceptor handler lookups in the InterceptorManager.
| Value |
|