Interface EventSubscriptionService
-
public interface EventSubscriptionServiceService in charge of dealing with the internal logic of the gateway
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SubscriptioncreateSubscription(Subscription subscription)Creates aSubscriptionwith the given configuration passed as aSubscriptionobjectList<Subscription>findSubscriptionsByUserAndFilterType(String user, String filterType)Find a list ofSubscriptionfiltered by the given username and containing at least one filter of a filter typeList<Subscription>findSubscriptionsByUserAndStatus(String user, SubscriptionStatus subscriptionStatus)Find a list ofSubscriptionfiltered by the given user andSubscriptionStatusSubscriptiongetSubscription(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.SubscriptionupdateSubscription(Subscription subscription)Updates aSubscriptionitem based on thesubscriptionparameter
-
-
-
Method Detail
-
getSubscription
Subscription getSubscription(String subscriptionId)
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
Subscription createSubscription(Subscription subscription)
Creates aSubscriptionwith the given configuration passed as aSubscriptionobject- Parameters:
subscription- the configuration needed to create aSubscription- Returns:
- the created
Subscription
-
updateSubscription
Subscription updateSubscription(Subscription subscription)
Updates aSubscriptionitem based on thesubscriptionparameter- Parameters:
subscription- the new subscription information to be updated- Returns:
- the updated
Subscriptionobject
-
refreshEventSubscription
void refreshEventSubscription(String subscriptionId)
Refreshes theEventSubscriptioninstance corresponding to a subscription identifier.- Parameters:
subscriptionId- the identifier of the subscription to be refreshed
-
findSubscriptionsByUserAndFilterType
List<Subscription> findSubscriptionsByUserAndFilterType(String user, String filterType)
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
void unregisterEventSubscription(String subscriptionId)
Deregister theEventSubscriptioninstance corresponding to a subscription identifier.- Parameters:
subscriptionId- the identifier of the subscription to be deregistered
-
-