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.
|
<T extends BaseActivity> |
addActivityToMany(List<String> targetIds,
T activity)
Add a new activity of type
T to multiple feeds. |
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.
|
void |
followMany(BaseFeed feed,
FollowMany followManyInput,
int activityCopyLimit)
Follow many feed in one shot.
|
<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)
Get the token for the given 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.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exceptionvoid deleteActivityByForeignId(BaseFeed feed, String foreignId) throws IOException, StreamClientException
feed - Feed that contains the activity to be deleted.foreignId - foreignId to be deleted.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exceptionsvoid follow(BaseFeed feed, String targetFeedId) throws StreamClientException, IOException
feed - Feed that wants to follow a target feed.targetFeedId - Feed to follow.StreamClientException - in case of functional or server-side exceptionIOException - in case of network/socket exceptionsvoid followMany(BaseFeed feed, FollowMany followManyInput, int activityCopyLimit) throws StreamClientException, IOException
feed - Feed that wants to follow a target feed.followManyInput - A FollowMany object which contains a list of sources and targetsactivityCopyLimit - Number of activities to copy from a source feed to the destination feedStreamClientException - in case of functional or server-side exceptionIOException - in case of network/socket exceptionsvoid unfollow(BaseFeed feed, String targetFeedId) throws StreamClientException, IOException
feed - Source feedtargetFeedId - Feed to unfollow.StreamClientException - in case of functional or server-side exceptionIOException - in case of network/socket exceptionsList<FeedFollow> getFollowing(BaseFeed feed, FeedFilter filter) throws StreamClientException, IOException
feed - Source feedfilter - Filter out the following list. Limited to 25 items by default.StreamClientException - in case of functional or server-side exceptionIOException - in case of network/socket exceptionsList<FeedFollow> getFollowers(BaseFeed feed, FeedFilter filter) throws StreamClientException, IOException
feed - Source feedfilter - Filter out the followers list. Limited to 25 items by default.StreamClientException - in case of functional or server-side exceptionIOException - in case of network/socket exceptions<T extends BaseActivity> StreamResponse<T> getActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
T - Subtype of BaseActivity representing the activity type to handle.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.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exception<T extends BaseActivity> T addActivity(BaseFeed feed, T activity) throws StreamClientException, IOException
T - Subtype of BaseActivity representing the activity type to handle.feed - Feed which the activities belong toactivity - Activity to add.StreamClientException - in case of functional or server-side exceptionIOException - in case of network/socket exceptions<T extends BaseActivity> T addActivityToMany(List<String> targetIds, T activity) throws StreamClientException, IOException
T to multiple feeds.targetIds - Destination feeds.activity - Activity to add.T coming from the server.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exception<T extends BaseActivity> StreamResponse<AggregatedActivity<T>> getAggregatedActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
T - Subtype of BaseActivity representing the activity type to handle.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.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exception<T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
T - Subtype of BaseActivity representing the activity type to handle.feed - Feed which the activities belong totype - Type of the activity. Must be a subtype of BaseActivityfilter - Filter out the activities.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exception<T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter, boolean markAsRead, boolean markAsSeen) throws IOException, StreamClientException
T - Subtype of BaseActivity representing the activity type to handle.feed - Feed which the activities belong totype - Type of the activity. Must be a subtype of BaseActivityfilter - Filter the activities.markAsRead - Mark all the activities as read.markAsSeen - Mark all the activities as seen.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exception<T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter, MarkedActivity markAsRead, MarkedActivity markAsSeen) throws IOException, StreamClientException
MarkedActivity builder.T - Subtype of BaseActivity representing the activity type to handle.feed - Feed which the activities belong totype - Type of the activity. Must be a subtype of BaseActivityfilter - Filter the activities.markAsRead - List of activities to be marked as read.markAsSeen - List of activities to be marked as seen.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exceptionString getToken(BaseFeed feed)
feed - Feedvoid shutdown()
throws IOException
IOException - in case of network/socket exceptionsCopyright © 2016. All rights reserved.