Interface OboPresenceService

All Known Implementing Classes:
PresenceService

@API(status=STABLE) public interface OboPresenceService
Service interface exposing OBO-enabled endpoints to manage user presence information.
  • Method Details

    • getPresence

      V2Presence getPresence()
      Get the online status (presence info) of the calling user. PresenceService.getPresence()
      Returns:
      Presence info of the calling user.
      See Also:
    • listPresences

      List<V2Presence> listPresences(@Nullable Long lastUserId, @Nullable Integer limit)
      Get the presence info of all users in a pod. PresenceService.listPresences(Long, Integer)
      Parameters:
      lastUserId - Last user ID retrieved, used for paging. If provided, results skip users with IDs less than this parameter.
      limit - Maximum number of records to return. The maximum supported value is 5000.
      Returns:
      List of presence info of all users in a pod.
      See Also:
    • getUserPresence

      V2Presence getUserPresence(@Nonnull Long userId, @Nullable Boolean local)
      Get the presence info of a specified user. PresenceService.getUserPresence(Long, Boolean)
      Parameters:
      userId - User Id
      local - If true then Perform a local query and set the presence to OFFLINE for users who are not local to the calling user’s pod. If false or absent then query the presence of all local and external users who are connected to the calling user.
      Returns:
      Presence info of the looked up user.
      See Also:
    • externalPresenceInterest

      void externalPresenceInterest(@Nonnull List<Long> userIds)
      Register interest in a list of external users to get their presence info. PresenceService.externalPresenceInterest(List)
      Parameters:
      userIds - List of user ids to be registered.
      See Also:
    • setPresence

      V2Presence setPresence(@Nonnull PresenceStatus status, @Nullable Boolean soft)
      Set the presence info of the calling user. PresenceService.setPresence(PresenceStatus, Boolean)
      Parameters:
      status - The new presence state for the user. Possible values are AVAILABLE, BUSY, AWAY, ON_THE_PHONE, BE_RIGHT_BACK, IN_A_MEETING, OUT_OF_OFFICE, OFF_WORK.
      soft - If true, the user's current status is taken into consideration. If the user is currently OFFLINE, the user's presence will still be OFFLINE, but the new presence will take effect when the user comes online. If the user is currently online, the user's activity state will be applied to the presence if applicable. (e.g. if you are setting their presence to AVAILABLE, but the user is currently idle, their status will be represented as AWAY)
      Returns:
      Presence info of the calling user.
      See Also:
    • createPresenceFeed

      String createPresenceFeed()
      Creates a new stream capturing online status changes ("presence feed") for the company (pod) and returns the ID of the new feed. The feed will return the presence of users whose presence status has changed since it was last read. PresenceService.createPresenceFeed()
      Returns:
      Presence feed Id
      See Also:
    • readPresenceFeed

      List<V2Presence> readPresenceFeed(@Nonnull String feedId)
      Reads the specified presence feed that was created. The feed returned includes the user presence statuses that have changed since they were last read. PresenceService.readPresenceFeed(String)
      Parameters:
      feedId - The presence feed id to be read.
      Returns:
      The list of user presences has changed since the last presence read.
      See Also:
    • deletePresenceFeed

      String deletePresenceFeed(@Nonnull String feedId)
      Delete the specified presence feed that was created. PresenceService.deletePresenceFeed(String)
      Parameters:
      feedId - The presence feed id to be deleted.
      Returns:
      The id of the deleted presence feed.
    • setUserPresence

      V2Presence setUserPresence(@Nonnull Long userId, @Nonnull PresenceStatus status, @Nullable Boolean soft)
      Set the presence state of a another user. PresenceService.setUserPresence(Long, PresenceStatus, Boolean)
      Parameters:
      userId - The id of the specified user.
      status - Presence state to set. Possible values are AVAILABLE, BUSY, AWAY, ON_THE_PHONE, BE_RIGHT_BACK, IN_A_MEETING, OUT_OF_OFFICE, OFF_WORK.
      soft - If true, the user's current status is taken into consideration. If the user is currently OFFLINE, the user's presence will still be OFFLINE, but the new presence will take effect when the user comes online. If the user is currently online, the user's activity state will be applied to the presence if applicable. (e.g. if you are setting their presence to AVAILABLE, but the user is currently idle, their status will be represented as AWAY)
      Returns:
      The presence info of the specified user.