public class StreamRepositoryImpl extends Object implements StreamRepository
| Constructor and Description |
|---|
StreamRepositoryImpl(ClientConfiguration streamClient,
com.squareup.okhttp.OkHttpClient closeableHttpClient)
Create a new
StreamRepository using the given configuration ClientConfiguration and
a pre-instantiated HttpClient OkHttpClient. |
public StreamRepositoryImpl(ClientConfiguration streamClient, com.squareup.okhttp.OkHttpClient closeableHttpClient)
StreamRepository using the given configuration ClientConfiguration and
a pre-instantiated HttpClient OkHttpClient.streamClient - closeableHttpClient - public String getToken(BaseFeed feed)
getToken in interface StreamRepositorypublic void follow(BaseFeed feed, String targetFeedId) throws StreamClientException, IOException
follow in interface StreamRepositoryStreamClientExceptionIOExceptionpublic void unfollow(BaseFeed feed, String targetFeedId) throws StreamClientException, IOException
unfollow in interface StreamRepositoryStreamClientExceptionIOExceptionpublic List<FeedFollow> getFollowing(BaseFeed feed, FeedFilter filter) throws StreamClientException, IOException
getFollowing in interface StreamRepositoryStreamClientExceptionIOExceptionpublic List<FeedFollow> getFollowers(BaseFeed feed, FeedFilter filter) throws StreamClientException, IOException
getFollowers in interface StreamRepositoryStreamClientExceptionIOExceptionpublic void deleteActivityById(BaseFeed feed, String activityId) throws IOException, StreamClientException
deleteActivityById in interface StreamRepositoryIOExceptionStreamClientExceptionpublic void deleteActivityByForeignId(BaseFeed feed, String activityId) throws IOException, StreamClientException
deleteActivityByForeignId in interface StreamRepositoryIOExceptionStreamClientExceptionpublic <T extends BaseActivity> StreamResponse<T> getActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
getActivities in interface StreamRepositoryIOExceptionStreamClientExceptionpublic <T extends BaseActivity> T addActivity(BaseFeed feed, T activity) throws StreamClientException, IOException
addActivity in interface StreamRepositoryStreamClientExceptionIOExceptionpublic <T extends BaseActivity> StreamResponse<AggregatedActivity<T>> getAggregatedActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
getAggregatedActivities in interface StreamRepositoryIOExceptionStreamClientExceptionpublic <T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter) throws IOException, StreamClientException
getNotificationActivities in interface StreamRepositoryIOExceptionStreamClientExceptionpublic <T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter, boolean markAsRead, boolean markAsSeen) throws IOException, StreamClientException
getNotificationActivities in interface StreamRepositoryIOExceptionStreamClientExceptionpublic <T extends BaseActivity> StreamResponse<NotificationActivity<T>> getNotificationActivities(BaseFeed feed, Class<T> type, FeedFilter filter, MarkedActivity markAsRead, MarkedActivity markAsSeen) throws IOException, StreamClientException
getNotificationActivities in interface StreamRepositoryIOExceptionStreamClientExceptionpublic void shutdown()
throws IOException
shutdown in interface StreamRepositoryIOExceptionpublic static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Copyright © 2015. All rights reserved.