Package io.ably.lib.rest
Class ChannelBase.Presence
- java.lang.Object
-
- io.ably.lib.rest.ChannelBase.Presence
-
- Enclosing class:
- ChannelBase
public class ChannelBase.Presence extends java.lang.ObjectA 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 Summary
Constructors Constructor Description Presence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PaginatedResult<PresenceMessage>get(Param[] params)Get the presence state for this Channel.voidgetAsync(Param[] params, Callback<AsyncPaginatedResult<PresenceMessage>> callback)Asynchronously get the presence state for this Channel.PaginatedResult<PresenceMessage>history(Param[] params)Asynchronously obtain presence history for this channel using the REST API.voidhistoryAsync(Param[] params, Callback<AsyncPaginatedResult<PresenceMessage>> callback)Asynchronously obtain recent history for this channel using the REST API.
-
-
-
Method Detail
-
get
public PaginatedResult<PresenceMessage> get(Param[] params) throws AblyException
Get the presence state for this Channel.- Throws:
AblyException
-
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.
-
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 APIcallback-
-
-