Interface OboStreamService
- All Known Implementing Classes:
StreamService
@API(status=STABLE)
public interface OboStreamService
Service interface exposing OBO-enabled endpoints to manage streams.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMemberToRoom
(Long userId, String roomId) create
(V3RoomAttributes roomAttributes) Create a new chatroom.Create a new single or multi party instant message conversation between the caller and specified users.void
demoteUserToRoomParticipant
(Long userId, String roomId) getRoomInfo
(String roomId) Get information about a particular room.listAllStreams
(StreamFilter filter) listAllStreams
(StreamFilter filter, StreamPaginationAttribute pagination) listStreams
(StreamFilter filter) listStreams
(StreamFilter filter, PaginationAttribute pagination) void
promoteUserToRoomOwner
(Long userId, String roomId) void
removeMemberFromRoom
(Long userId, String roomId) Search rooms and return in aStream
according to the specified criteria.searchAllRooms
(V2RoomSearchCriteria query, StreamPaginationAttribute pagination) Search rooms and return in aStream
according to the specified criteria.searchRooms
(V2RoomSearchCriteria query) Search rooms according to the specified criteria.searchRooms
(V2RoomSearchCriteria query, PaginationAttribute pagination) Search rooms according to the specified criteria.share
(String streamId, ShareContent content) updateRoom
(String roomId, V3RoomAttributes roomAttributes) Update the attributes of an existing chatroom.
-
Method Details
-
create
- Parameters:
uids
- User ids of the participant- Returns:
- The created IM
- See Also:
-
create
Create a new single or multi party instant message conversation between the caller and specified users.The caller is implicitly included in the members of the created chat.
Duplicate users will be included in the membership of the chat but the duplication will be silently ignored.
If there is an existing IM conversation with the same set of participants then the id of that existing stream will be returned.
If the given list of user ids contains only one id, an IM will be created, otherwise, a MIM will be created.
- Parameters:
uids
- List of user ids of the participants.- Returns:
- The created IM or MIM
- See Also:
-
create
Create a new chatroom. If no attributes are specified, the room is created as a private chatroom.- Parameters:
roomAttributes
- Attributes of the created room- Returns:
- The created chatroom
- See Also:
-
getStream
- Parameters:
streamId
- The stream id.- Returns:
- The information about the stream with the given id.
- See Also:
-
getRoomInfo
Get information about a particular room.- Parameters:
roomId
- The room id.- Returns:
- The information about the room with the given room id.
- See Also:
-
listStreams
- Parameters:
filter
- The stream searching criteria.- Returns:
- The list of streams retrieved according to the searching criteria.
- See Also:
-
listStreams
List<StreamAttributes> listStreams(@Nullable StreamFilter filter, @Nonnull PaginationAttribute pagination) - Parameters:
filter
- The stream searching criteria.pagination
- The skip and limit for pagination.- Returns:
- The list of streams retrieved according to the searching criteria.
- See Also:
-
listAllStreams
- Parameters:
filter
- The stream searching criteria.- Returns:
- a
Stream
of matching streams according to the searching criteria. - See Also:
-
listAllStreams
@API(status=EXPERIMENTAL) Stream<StreamAttributes> listAllStreams(@Nullable StreamFilter filter, @Nonnull StreamPaginationAttribute pagination) - Parameters:
filter
- The stream searching criteria.pagination
- The chunkSize and totalSize for pagination.- Returns:
- a
Stream
of matching streams according to the searching criteria. - See Also:
-
searchRooms
Search rooms according to the specified criteria.- Parameters:
query
- The room searching criteria- Returns:
- The rooms returned according to the given criteria.
- See Also:
-
searchRooms
V3RoomSearchResults searchRooms(@Nonnull V2RoomSearchCriteria query, @Nonnull PaginationAttribute pagination) Search rooms according to the specified criteria.- Parameters:
query
- The room searching criteria.pagination
- The skip and limit for pagination.- Returns:
- The rooms returned according to the given criteria.
- See Also:
-
searchAllRooms
Search rooms and return in aStream
according to the specified criteria.- Parameters:
query
- The room searching criteria.- Returns:
- A
Stream
of rooms returned according to the given criteria. - See Also:
-
searchAllRooms
@API(status=EXPERIMENTAL) Stream<V3RoomDetail> searchAllRooms(@Nonnull V2RoomSearchCriteria query, @Nonnull StreamPaginationAttribute pagination) Search rooms and return in aStream
according to the specified criteria.- Parameters:
query
- The room searching criteria.pagination
- The chunkSize and totalSize for stream pagination.- Returns:
- A
Stream
of rooms returned according to the given criteria. - See Also:
-
updateRoom
Update the attributes of an existing chatroom.- Parameters:
roomId
- The id of the room to be updatedroomAttributes
- The attributes to be updated to the room- Returns:
- The information of the room after being updated.
- See Also:
-
addMemberToRoom
- Parameters:
userId
- The id of the user to be added to the given roomroomId
- The room id- See Also:
-
removeMemberFromRoom
- Parameters:
userId
- The id of the user to be removed from the given roomroomId
- The room id- See Also:
-
promoteUserToRoomOwner
- Parameters:
userId
- The id of the user to be promoted to room owner.roomId
- The room id.- See Also:
-
demoteUserToRoomParticipant
- Parameters:
userId
- The id of the user to be demoted to room participant.roomId
- The room id.- See Also:
-