public interface EventProcessor
Metacards are created, updated, or deleted.
| Modifier and Type | Field and Description |
|---|---|
static String |
EVENT_METACARD
Deprecated.
This constant is implementation specific and will be removed from API
|
static String |
EVENT_OLD_METACARD
Deprecated.
This constant is implementation specific and will be removed from API
|
static String |
EVENT_TIME
Deprecated.
This constant is implementation specific and will be removed from API
|
static String |
EVENTS_TOPIC_CREATED
Deprecated.
This constant is implementation specific and will be removed from API
|
static String |
EVENTS_TOPIC_DELETED
Deprecated.
This constant is implementation specific and will be removed from API
|
static String |
EVENTS_TOPIC_UPDATED
Deprecated.
This constant is implementation specific and will be removed from API
|
| Modifier and Type | Method and Description |
|---|---|
String |
createSubscription(Subscription subscription)
Create a
Subscription with an automatically-generated id. |
void |
createSubscription(Subscription subscription,
String subscriptionId)
Register a
Subscription with this CatalogFramework. |
void |
deleteSubscription(String subscriptionId)
Deletes the subscription associated with the given id.
|
void |
notifyCreated(Metacard newMetacard)
|
void |
notifyDeleted(Metacard oldMetacard)
|
void |
notifyUpdated(Metacard newMetacard,
Metacard oldMetacard)
|
void |
updateSubscription(Subscription subscription,
String subcriptionId)
Updates the subscription associated with the given id.
|
static final String EVENT_METACARD
static final String EVENT_OLD_METACARD
static final String EVENT_TIME
static final String EVENTS_TOPIC_CREATED
static final String EVENTS_TOPIC_UPDATED
static final String EVENTS_TOPIC_DELETED
String createSubscription(Subscription subscription) throws InvalidSubscriptionException
Subscription with an automatically-generated id.subscription - the Subscription to registerString an id for the registered Subscription that can be used later by
calling #unsubscribe(String)InvalidSubscriptionException - if this EventProcessor can not support the Filter of the provided Subscription.createSubscription(Subscription, String)void createSubscription(Subscription subscription, String subscriptionId) throws InvalidSubscriptionException, SubscriptionExistsException
Subscription with this CatalogFramework.
Note: Subscriptions are transient, not durable, i.e., only maintained in
memory and will be lost if DDF is shutdown.
Durability must be implemented by the client bundle (typically an endpoint - refer to DurableSubscription for an example).
Note: A Subscription can also be registered using the whiteboard
model:
To register a Subscription via the whiteboard model, simply register any implementation
of Subscription with OSGi registry under the interface Subscription. To
unregister the Subscription, simply unregister the service that was originally
registered. Subscriptions registered in this manner do not get a subscription id and
cannot be unsubscribed via the EventProcessor Implementations of this method
must call the PreSubscriptionPlugin.process(Subscription)
method for each
subscription - the Subscription to registersubscriptionId - the desired idInvalidSubscriptionException - if this EventProcessor can not support the Filter of the provided Subscription.SubscriptionExistsException - if a subscription with this ID already existsvoid updateSubscription(Subscription subscription, String subcriptionId) throws SubscriptionNotFoundException
subscription - the subscription to updatesubcriptionId - the subscription id to identify the subscriptionSubscriptionNotFoundException - if the subscription was not foundvoid deleteSubscription(String subscriptionId) throws SubscriptionNotFoundException
user - deleting the subscriptionsubscriptionId - the subscription id to identify the subscription to deleteSubscriptionNotFoundException - if the subscription was not foundvoid notifyCreated(Metacard newMetacard)
EventProcessor that a Metacard (or equivalent) has been created in
a RemoteSource.
Implementations of this method must:
PreDeliveryPlugin.processCreate(Metacard) method for
all of the registered PreDeliveryPlugins
DeliveryMethod.created(Metacard) method of the DeliveryMethod of
matching Subscriptions with the new Metacard created.
newMetacard - the newly created MetacardRemoteSource,
FederatedSource,
ConnectedSourcevoid notifyUpdated(Metacard newMetacard, Metacard oldMetacard)
EventProcessor that a Metacard (or equivalent) has been updated in
a RemoteSource.
Implementations of this method must:
PreDeliveryPlugin.processUpdateHit(ddf.catalog.operation.Update)
method of all registered PreDeliveryPlugins when a Metacard has been updated and the new version matches a Subscription
Call PreDeliveryPlugin.processUpdateMiss(ddf.catalog.operation.Update)
method of all registered PreDeliveryPlugins when a Metacard has been updated and the new version matches a Subscription but the old
version does not
DeliveryMethod with the updated Metacard.
newMetacard - the new version of the MetacardoldMetacard - the previous version of the Metacard (optional, pass null if
not relevant)FederatedSource,
RemoteSource,
ConnectedSourcevoid notifyDeleted(Metacard oldMetacard)
EventProcessor that a Metacard (or equivalent) has been deleted in
a RemoteSource.
Implementations of this method must:
Metacard is fully populated) call all active matching
Subscriptions associated DeliveryMethod.deleted(Metacard) with the Metacard that was deleted.
Metacard only has Metacard.getId(), call all
active Subscriptions.
oldMetacard - the deleted MetacardRemoteSource,
FederatedSource,
ConnectedSourceThis work is licensed under a Creative Commons Attribution 4.0 International License.