Class ChannelBase.Presence
- Enclosing class:
- ChannelBase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the current members present on the channel and the metadata for each member, such as theirPresenceMessage.Actionand ID.voidgetAsync(Param[] params, Callback<AsyncPaginatedResult<PresenceMessage>> callback) Asynchronously retrieves the current members present on the channel and the metadata for each member, such as theirPresenceMessage.Actionand ID.Retrieves aPaginatedResultobject, containing an array of historicalPresenceMessageobjects for the channel.voidhistoryAsync(Param[] params, Callback<AsyncPaginatedResult<PresenceMessage>> callback) Asynchronously retrieves aPaginatedResultobject, containing an array of historicalPresenceMessageobjects 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.Actionand ID. Returns aPaginatedResultobject, containing an array ofPresenceMessageobjects.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
PaginatedResultobject containing an array ofPresenceMessageobjects. - Throws:
AblyException
-
getAsync
Asynchronously retrieves the current members present on the channel and the metadata for each member, such as theirPresenceMessage.Actionand ID. Returns aPaginatedResultobject, containing an array ofPresenceMessageobjects.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 returningAsyncPaginatedResultobject containing an array ofPresenceMessageobjects.This callback is invoked on a background thread.
-
history
Retrieves aPaginatedResultobject, containing an array of historicalPresenceMessageobjects 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
PaginatedResultobject containing an array ofPresenceMessageobjects. - Throws:
AblyException
-
historyAsync
Asynchronously retrieves aPaginatedResultobject, containing an array of historicalPresenceMessageobjects 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 returningAsyncPaginatedResultobject containing an array ofPresenceMessageobjects.This callback is invoked on a background thread.
- Throws:
AblyException
-