Interface EventSubscriptionService
public interface EventSubscriptionService
Service in charge of dealing with the internal logic of the gateway
-
Method Summary
Modifier and TypeMethodDescriptioncreateSubscription(Subscription subscription) Creates aSubscriptionwith the given configuration passed as aSubscriptionobjectfindSubscriptionsByUserAndFilterType(String user, String filterType) Find a list ofSubscriptionfiltered by the given username and containing at least one filter of a filter typefindSubscriptionsByUserAndStatus(String user, SubscriptionStatus subscriptionStatus) Find a list ofSubscriptionfiltered by the given user andSubscriptionStatusgetSubscription(String subscriptionId) Fetches a givenSubscriptionbased on IdvoidrefreshEventSubscription(String subscriptionId) Refreshes theEventSubscriptioninstance corresponding to a subscription identifier.voidunregisterEventSubscription(String subscriptionId) Deregister theEventSubscriptioninstance corresponding to a subscription identifier.updateSubscription(Subscription subscription) Updates aSubscriptionitem based on thesubscriptionparameter
-
Method Details
-
getSubscription
Fetches a givenSubscriptionbased on Id- Parameters:
subscriptionId- the id of theSubscriptionto be returned- Returns:
- a
Subscriptionwith the subscription configuration of a given client application
-
createSubscription
Creates aSubscriptionwith the given configuration passed as aSubscriptionobject- Parameters:
subscription- the configuration needed to create aSubscription- Returns:
- the created
Subscription
-
updateSubscription
Updates aSubscriptionitem based on thesubscriptionparameter- Parameters:
subscription- the new subscription information to be updated- Returns:
- the updated
Subscriptionobject
-
refreshEventSubscription
Refreshes theEventSubscriptioninstance corresponding to a subscription identifier.- Parameters:
subscriptionId- the identifier of the subscription to be refreshed
-
findSubscriptionsByUserAndFilterType
Find a list ofSubscriptionfiltered by the given username and containing at least one filter of a filter type- Parameters:
user- the username by which aSubscriptionis going to be filteredfilterType- the type of filter to search for- Returns:
- A list of
Subscriptionmatching with the requirements
-
findSubscriptionsByUserAndStatus
List<Subscription> findSubscriptionsByUserAndStatus(String user, SubscriptionStatus subscriptionStatus) Find a list ofSubscriptionfiltered by the given user andSubscriptionStatus- Parameters:
user- the username by which aSubscriptionis going to be filteredsubscriptionStatus- the subscription status to search for- Returns:
- A list of
Subscriptionmatching with the requirements
-
unregisterEventSubscription
Deregister theEventSubscriptioninstance corresponding to a subscription identifier.- Parameters:
subscriptionId- the identifier of the subscription to be deregistered
-