public class RemoteNotificationFeedManager extends Object implements NotificationFeedManager
NotificationFeedManager that connects to a remote feed manager service
through internal RESTful APIs.| Constructor and Description |
|---|
RemoteNotificationFeedManager(DiscoveryServiceClient discoveryClient) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createFeed(co.cask.cdap.proto.Id.NotificationFeed feed)
Create a notification feed.
|
void |
deleteFeed(co.cask.cdap.proto.Id.NotificationFeed feed)
Deletes the
feed from the manager store. |
co.cask.cdap.proto.Id.NotificationFeed |
getFeed(co.cask.cdap.proto.Id.NotificationFeed feed)
Get a
Id.NotificationFeed based on the feed.getId() method of the feed argument. |
List<co.cask.cdap.proto.Id.NotificationFeed> |
listFeeds(co.cask.cdap.proto.Id.Namespace namespace)
List all the
Id.NotificationFeeds present in the manager store for a namespace. |
@Inject public RemoteNotificationFeedManager(DiscoveryServiceClient discoveryClient)
public boolean createFeed(co.cask.cdap.proto.Id.NotificationFeed feed)
throws NotificationFeedException
NotificationFeedManagercreateFeed in interface NotificationFeedManagerfeed - the feed to createtrue if the feed was created successfully; false if the feed already existsNotificationFeedException - if the feed has an incorrect structure;
for example, if it is missing a name, a namespace or a categorypublic void deleteFeed(co.cask.cdap.proto.Id.NotificationFeed feed)
throws NotificationFeedNotFoundException,
NotificationFeedException
NotificationFeedManagerfeed from the manager store. To determine if the feed exists,
the Id.NotificationFeed#getFeedId method is used.deleteFeed in interface NotificationFeedManagerfeed - the Id.NotificationFeed to deleteNotificationFeedNotFoundException - if the feed does not existNotificationFeedException - in case of unforeseen errorpublic co.cask.cdap.proto.Id.NotificationFeed getFeed(co.cask.cdap.proto.Id.NotificationFeed feed)
throws NotificationFeedNotFoundException,
NotificationFeedException
NotificationFeedManagerId.NotificationFeed based on the feed.getId() method of the feed argument.getFeed in interface NotificationFeedManagerfeed - feed containing the feed Id of the feed to retrieveId.NotificationFeed of the feed which ID is the same as feedNotificationFeedNotFoundException - if the feed does not existNotificationFeedException - in case of unforeseen errorpublic List<co.cask.cdap.proto.Id.NotificationFeed> listFeeds(co.cask.cdap.proto.Id.Namespace namespace) throws NotificationFeedException
NotificationFeedManagerId.NotificationFeeds present in the manager store for a namespace.listFeeds in interface NotificationFeedManagernamespace - Id of the namespace to list feeds forId.NotificationFeeds present in the manager storeNotificationFeedException - in case of unforeseen errorCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.