Interface OboConnectionService
- All Known Implementing Classes:
ConnectionService
@API(status=STABLE)
public interface OboConnectionService
Service interface exposing OBO-enabled endpoints to manage user connection status.
-
Method Summary
Modifier and TypeMethodDescriptionacceptConnection
(Long userId) Accept the connection request from a requesting user.createConnection
(Long userId) Sends a connection request to another user.getConnection
(Long userId) Get connection status, i.e.listConnections
(ConnectionStatus status, List<Long> userIds) List all current connection statuses with external or specified users.rejectConnection
(Long userId) Reject the connection request from a requesting user.void
removeConnection
(Long userId) Removes a connection with a user.
-
Method Details
-
getConnection
Get connection status, i.e. check if the calling user is connected to the specified user.ConnectionService.getConnection(Long)
- Parameters:
userId
- The id of the user with whom the caller want to check.- Returns:
- Connection status with the specified user.
- See Also:
-
listConnections
List<UserConnection> listConnections(@Nullable ConnectionStatus status, @Nullable List<Long> userIds) List all current connection statuses with external or specified users.ConnectionService.listConnections(ConnectionStatus, List)
- Parameters:
status
- Filter the connection list based on the connection status. The connection status can only be pending_incoming, pending_outgoing, accepted, rejected, or all. If you do not specify a status, all connections will be returned.userIds
- List of user ids which are used to restrict the list of results. This can be used to return connections with internal users; although, by default, this endpoint does not list implicit connections with internal users.- Returns:
- List of connection statuses with the specified users and status.
- See Also:
-
createConnection
Sends a connection request to another user.ConnectionService.createConnection(Long)
- Parameters:
userId
- The id of the user with whom the caller want to connect.- Returns:
- Connection status with the specified user.
- See Also:
-
acceptConnection
Accept the connection request from a requesting user.ConnectionService.acceptConnection(Long)
- Parameters:
userId
- The id of the user who requested to connect with the caller.- Returns:
- Connection status with the requesting user.
- See Also:
-
rejectConnection
Reject the connection request from a requesting user.ConnectionService.rejectConnection(Long)
- Parameters:
userId
- The id of the user who requested to connect with the caller.- Returns:
- Connection status with the requesting user.
- See Also:
-
removeConnection
Removes a connection with a user.ConnectionService.removeConnection(Long)
- Parameters:
userId
- The id of the user with whom we want to remove the connection.- See Also:
-