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 Details

    • getConnection

      UserConnection getConnection(@Nonnull Long userId)
      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

      UserConnection createConnection(@Nonnull Long userId)
      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

      UserConnection acceptConnection(@Nonnull Long userId)
      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

      UserConnection rejectConnection(@Nonnull Long userId)
      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

      void removeConnection(@Nonnull Long userId)
      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: