public interface StreamRepository
| Modifier and Type | Method and Description |
|---|---|
<T extends BaseActivity> |
addActivity(BaseFeed feed,
T activity)
Add a new activity to the given feed.
|
void |
deleteActivityByForeignId(BaseFeed feed,
String foreignId)
Delete activity by foreign id.
|
void |
deleteActivityById(BaseFeed feed,
String activityId)
Delete activity by activity id.
|
void |
follow(BaseFeed feed,
String targetFeedId)
Follow a feed.
|
<T extends BaseActivity> |
getActivities(BaseFeed feed,
Class<T> type,
FeedFilter filter)
Lists the activities in the given feed.
|
<T extends BaseActivity> |
getAggregatedActivities(BaseFeed feed,
Class<T> type,
FeedFilter filter)
List aggregated activities.
|
List<FeedFollow> |
getFollowers(BaseFeed feed,
FeedFilter filter)
Lists the followers for the given feed.
|
List<FeedFollow> |
getFollowing(BaseFeed feed,
FeedFilter filter)
List the feeds which the given feed is following.
|
<T extends BaseActivity> |
getNotificationActivities(BaseFeed feed,
Class<T> type,
FeedFilter filter)
List notification activities.
|
<T extends BaseActivity> |
getNotificationActivities(BaseFeed feed,
Class<T> type,
FeedFilter filter,
boolean markAsRead,
boolean markAsSeen)
List notifications marking the activities as read and/or as seen.
|
<T extends BaseActivity> |
getNotificationActivities(BaseFeed feed,
Class<T> type,
FeedFilter filter,
MarkedActivity markAsRead,
MarkedActivity markAsSeen)
List notifications marking some of them as read and/or as seen.
|
String |
getToken(BaseFeed feed) |
void |
shutdown()
Send the shutdown signal to the client.
|
void |
unfollow(BaseFeed feed,
String targetFeedId)
Unfollow a feed.
|
void deleteActivityById(BaseFeed feed, String activityId) throws IOException, StreamClientException
feed - Feed that contains the activity to be deleted.activityId - Activity-id to be deleted.IOExceptionStreamClientExceptionvoid deleteActivityByForeignId(BaseFeed feed, String foreignId) throws IOException, StreamClientException
feed - Feed that contains the activity to be deleted.foreignId - foreignId to be deleted.IOExceptionStreamClientExceptionvoid follow(BaseFeed feed, String targetFeedId) throws StreamClientException, IOException
feed - Feed that wants to follow a target feed.targetFeedId - Feed to follow.StreamClientExceptionIOExceptionvoid unfollow(BaseFeed feed, String targetFeedId) throws StreamClientException, IOException
feed - targetFeedId - Feed to unfollow.StreamClientExceptionIOExceptionList<FeedFollow> getFollowing(BaseFeed feed, FeedFilter filter) throws StreamClientException, IOException
feed - filter - Filter out the following list. Limited to 25 items by default.StreamClientExceptionIOExceptionList<FeedFollow> getFollowers(BaseFeed feed, FeedFilter filter) throws StreamClientException, IOException
feed - filter - Filter out the followers list. Limited to 25 items by default.StreamClientExceptionIOException<T extends BaseActivity> StreamResponse<T> getActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
T - feed - Feed which the activities belong totype - Type of the activity. Must be a subtype of BaseActivityfilter - Filter out the activities. Limited to 25 items by default.IOExceptionStreamClientException<T extends BaseActivity> T addActivity(BaseFeed feed, T activity) throws StreamClientException, IOException
T - feed - Feed which the activities belong toactivity - Activity to add.StreamClientExceptionIOException<T extends BaseActivity> StreamResponse<AggregatedActivity<T>> getAggregatedActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
T - feed - Feed which the activities belong totype - Type of the activity. Must be a subtype of BaseActivityfilter - Filter out the activities. Limited to 25 items by default.IOExceptionStreamClientException<T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
T - feed - type - filter - Filter out the activities.IOExceptionStreamClientException<T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter, boolean markAsRead, boolean markAsSeen) throws IOException, StreamClientException
T - feed - type - filter - Filter the activities.markAsRead - Mark all the activities as read.markAsSeen - Mark all the activities as seen.IOExceptionStreamClientException<T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter, MarkedActivity markAsRead, MarkedActivity markAsSeen) throws IOException, StreamClientException
MarkedActivity builder.T - feed - type - filter - Filter the activities.markAsRead - List of activities to be marked as read.markAsSeen - List of activities to be marked as seen.IOExceptionStreamClientExceptionvoid shutdown()
throws IOException
IOExceptionCopyright © 2015. All rights reserved.