Interface EventSubscriptionRegistry
-
public interface EventSubscriptionRegistryRegistry that manages all theEventSubscriptionobjects of the event gateway microservice. This component offers functionality to add, remove and retrieve all the event subscriptions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidderegister(String id)Remove an existingEventSubscriptionfrom the registry by its identifier.EventSubscriptiongetById(String id)Get anEventSubscriptionfrom the registry by its identifier.voidregister(String id, EventSubscription eventSubscription)Add a newEventSubscriptionunder an identifier to the registry.
-
-
-
Method Detail
-
register
void register(String id, EventSubscription eventSubscription)
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
void deregister(String id)
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
EventSubscription getById(String id)
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
-
-