Class ChannelBase.Presence
- Enclosing class:
- ChannelBase
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the current members present on the channel and the metadata for each member, such as theirPresenceMessage.Action
and ID.void
getAsync
(Param[] params, Callback<AsyncPaginatedResult<PresenceMessage>> callback) Asynchronously retrieves the current members present on the channel and the metadata for each member, such as theirPresenceMessage.Action
and ID.Retrieves aPaginatedResult
object, containing an array of historicalPresenceMessage
objects for the channel.void
historyAsync
(Param[] params, Callback<AsyncPaginatedResult<PresenceMessage>> callback) Asynchronously retrieves aPaginatedResult
object, containing an array of historicalPresenceMessage
objects for the channel.
-
Constructor Details
-
Presence
public Presence()
-
-
Method Details
-
get
Retrieves the current members present on the channel and the metadata for each member, such as theirPresenceMessage.Action
and ID. Returns aPaginatedResult
object, containing an array ofPresenceMessage
objects.Spec: RSPa
- Parameters:
-
params
- the request params:limit (RSP3a) - An upper limit on the number of messages returned. The default is 100, and the maximum is 1000.
clientId (RSP3a2) - Filters the list of returned presence members by a specific client using its ID.
connectionId (RSP3a3) - Filters the list of returned presence members by a specific connection using its ID.
- Returns:
- A
PaginatedResult
object containing an array ofPresenceMessage
objects. - Throws:
AblyException
-
getAsync
Asynchronously retrieves the current members present on the channel and the metadata for each member, such as theirPresenceMessage.Action
and ID. Returns aPaginatedResult
object, containing an array ofPresenceMessage
objects.Spec: RSPa
- Parameters:
-
params
- the request params:limit (RSP3a) - An upper limit on the number of messages returned. The default is 100, and the maximum is 1000.
clientId (RSP3a2) - Filters the list of returned presence members by a specific client using its ID.
connectionId (RSP3a3) - Filters the list of returned presence members by a specific connection using its ID.
-
callback
- A Callback returningAsyncPaginatedResult
object containing an array ofPresenceMessage
objects.This callback is invoked on a background thread.
-
history
Retrieves aPaginatedResult
object, containing an array of historicalPresenceMessage
objects for the channel. If the channel is configured to persist messages, then presence messages can be retrieved from history for up to 72 hours in the past. If not, presence messages can only be retrieved from history for up to two minutes in the past.Spec: RSP4a
- Parameters:
-
params
- the request params:start (RSP4b1) - The time from which messages are retrieved, specified as milliseconds since the Unix epoch.
end (RSP4b1) - The time until messages are retrieved, specified as milliseconds since the Unix epoch.
direction (RSP4b2) - The order for which messages are returned in. Valid values are backwards which orders messages from most recent to oldest, or forwards which orders messages from oldest to most recent. The default is backwards. limit (RSP4b3) - An upper limit on the number of messages returned. The default is 100, and the maximum is 1000.
- Returns:
- A
PaginatedResult
object containing an array ofPresenceMessage
objects. - Throws:
AblyException
-
historyAsync
Asynchronously retrieves aPaginatedResult
object, containing an array of historicalPresenceMessage
objects for the channel. If the channel is configured to persist messages, then presence messages can be retrieved from history for up to 72 hours in the past. If not, presence messages can only be retrieved from history for up to two minutes in the past.Spec: RSP4a
- Parameters:
-
params
- the request params:start (RSP4b1) - The time from which messages are retrieved, specified as milliseconds since the Unix epoch.
end (RSP4b1) - The time until messages are retrieved, specified as milliseconds since the Unix epoch.
direction (RSP4b2) - The order for which messages are returned in. Valid values are backwards which orders messages from most recent to oldest, or forwards which orders messages from oldest to most recent. The default is backwards. limit (RSP4b3) - An upper limit on the number of messages returned. The default is 100, and the maximum is 1000.
-
callback
- A Callback returningAsyncPaginatedResult
object containing an array ofPresenceMessage
objects.This callback is invoked on a background thread.
- Throws:
AblyException
-