Interface EventSubscriptionRegistry
public interface EventSubscriptionRegistry
Registry that manages all the
EventSubscription objects of the event gateway microservice. This component offers functionality to add, remove and
retrieve all the event subscriptions.-
Method Summary
Modifier and TypeMethodDescriptionvoidderegister(String id) Remove an existingEventSubscriptionfrom the registry by its identifier.Get anEventSubscriptionfrom the registry by its identifier.voidregister(String id, EventSubscription eventSubscription) Add a newEventSubscriptionunder an identifier to the registry.
-
Method Details
-
register
Add a newEventSubscriptionunder an identifier to the registry. If the identifier was already registered, then the registration will be updated with the newEventSubscription.- Parameters:
id- the identifier to register theEventSubscriptionagainsteventSubscription- theEventSubscriptionto register
-
deregister
Remove an existingEventSubscriptionfrom the registry by its identifier. If the identifier is not included in the registry nothing happens.- Parameters:
id- the identifier to remove from the registry
-
getById
Get anEventSubscriptionfrom the registry by its identifier. If noEventSubscriptionis registered under that identifier,nullis returned instead.- Parameters:
id- theEventSubscriptionidentifier to search in the registry- Returns:
- the corresponding
EventSubscriptionornullif the identifier is not in the registry
-