Interface IComplianceSubscription
- All Superinterfaces:
com.persequor.extension.subscription.IAdvancedSubscriptionProcessor
- All Known Implementing Classes:
ComplianceSubscriptionProcessor
,ResponseBasedComplianceSubscription
public interface IComplianceSubscription
extends com.persequor.extension.subscription.IAdvancedSubscriptionProcessor
Extensions of this type should inherit from
ComplianceSubscriptionProcessor
rather than implementing this directly.-
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(com.persequor.event.Event event) Perform a fast check to see if the event is relevant to this compliance subscription.default void
afterStorageHook
(com.persequor.event.Event event, ComplianceRepositoryReply reply) Hook to perform some after-storage logic, for example re-indexing the event in Elasticdefault void
postProcessingHook
(com.persequor.event.Event event, ComplianceProcessResponse response) Provides a hook for adding post processing logic, e.g.Methods inherited from interface com.persequor.extension.subscription.IAdvancedSubscriptionProcessor
process
-
Method Details
-
accept
boolean accept(com.persequor.event.Event event) Perform a fast check to see if the event is relevant to this compliance subscription. Since this method is invoked across all compliance schemes at a "hot spot" in the processing, it is important that the implementation is fast, does not rely on third parties, or I/O operations like doing DB lookups. Also, the method must not throw exceptions - if it does the event will not be processed by this subscription.- Parameters:
event
- the event to process- Returns:
- true if the event should be sent to the subscription.
-
getComplianceRepositoryId
String getComplianceRepositoryId()- Returns:
- Name that uniquely identifies the compliance repository
-
getMessageType
IMessageType getMessageType()- Returns:
- Type of your subscription eg. utilisation, TPD 31
-
afterStorageHook
Hook to perform some after-storage logic, for example re-indexing the event in Elastic- Parameters:
event
- the event that has been processedreply
- the compliance reply saved
-
postProcessingHook
default void postProcessingHook(com.persequor.event.Event event, ComplianceProcessResponse response) Provides a hook for adding post processing logic, e.g. for dispatching to a secondary subscription or similar. Note that the inputs are not intended for modification/enrichment, but rather for triggering an action after all regular processing of the event has finished.- Parameters:
event
- The processed eventresponse
- The processing result
-