Pre-Subscription Plugin
Usage
Pre-Subscription plugins are invoked before a Subscription is activated by an Event Processor. This is an opportunity to take any action on the Subscription, including but not limited to:
- validation
- logging
- auditing
- optimization
- security filtering
Failure Behavior
In the event that this Catalog Plugin cannot operate but does not wish to fail the transaction, a PluginExecutionException will be thrown. For any other Exceptions, the Catalog will "fail safe" and the Operation will be cancelled. If processing is to be explicitly stopped, a StopProcessingException will be thrown.
Failure Behavior
In the event that this Catalog Plugin cannot operate but does not wish to fail the transaction, a PluginExecutionException will be thrown. For any other Exceptions, the Catalog will "fail safe" and the Operation will be cancelled. If processing is to be explicitly stopped, a StopProcessingException will be thrown.
Invocation
Pre-Subscription plugins are invoked serially, prioritized by descending OSGi service ranking. That is, the plugin with the highest service ranking will be executed first.
The output of a Pre-Subscription plugin is sent to the next Pre-Subscription plugin, until all have executed and the create Subscription operation is sent to the Event Processor.
Examples
DDF
includes a Pre-Subscription Plugin example in the SDK that illustrates how to modify a subscription's filter. This example is located in theDDF
trunk atsdk/sample-plugins/ddf/sdk/plugin/presubscription
.