Class ChannelBase.Presence

  • Enclosing class:
    ChannelBase

    public class ChannelBase.Presence
    extends java.lang.Object
    A class enabling access to Channel Presence information via the REST API. Since the library is stateless, REST clients are therefore never present themselves. This API enables the service to be queried to determine presence state for other clients on this channel.
    • Constructor Detail

      • Presence

        public Presence()
    • Method Detail

      • getAsync

        public void getAsync​(Param[] params,
                             Callback<AsyncPaginatedResult<PresenceMessage>> callback)
        Asynchronously get the presence state for this Channel.
        Parameters:
        callback - on success returns the currently present members.

        This callback is invoked on a background thread.

      • history

        public PaginatedResult<PresenceMessage> history​(Param[] params)
                                                 throws AblyException
        Asynchronously obtain presence history for this channel using the REST API. The history provided relqtes to all clients of this application, not just this instance.
        Parameters:
        params - the request params. See the Ably REST API documentation for more details.
        Throws:
        AblyException
      • historyAsync

        public void historyAsync​(Param[] params,
                                 Callback<AsyncPaginatedResult<PresenceMessage>> callback)
        Asynchronously obtain recent history for this channel using the REST API.
        Parameters:
        params - the request params. See the Ably REST API
        callback -

        This callback is invoked on a background thread.