public class ChannelBase
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
ChannelBase.Presence
Enables the retrieval of the current and historic presence set for a channel.
|
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
name
The Channel name
|
ChannelBase.Presence |
presence
The presence instance for this channel.
|
| Modifier and Type | Method and Description |
|---|---|
PaginatedResult<Message> |
history(Param[] params)
Obtain recent history for this channel using the REST API.
|
void |
historyAsync(Param[] params,
Callback<AsyncPaginatedResult<Message>> callback)
Asynchronously obtain recent history for this channel using the REST API.
|
void |
publish(Message[] messages)
Publish an array of messages on this channel.
|
void |
publish(java.lang.String name,
java.lang.Object data)
Publish a message on this channel using the REST API.
|
void |
publishAsync(Message[] messages,
CompletionListener listener)
Asynchronously publish an array of messages on this channel
|
void |
publishAsync(java.lang.String name,
java.lang.Object data,
CompletionListener listener)
Publish a message on this channel using the REST API.
|
public final java.lang.String name
public final ChannelBase.Presence presence
public void publish(java.lang.String name,
java.lang.Object data)
throws AblyException
name - the event namedata - the message payload; see io.ably.types.Data for
details of supported data types.AblyExceptionpublic void publishAsync(java.lang.String name,
java.lang.Object data,
CompletionListener listener)
name - the event namedata - the message payload; see io.ably.types.Data forlistener - a listener to be notified of the outcome of this message.
This listener is invoked on a background thread.
public void publish(Message[] messages) throws AblyException
messages - array of messages to publish.AblyExceptionpublic void publishAsync(Message[] messages, CompletionListener listener)
messages - the messagelistener - a listener to be notified of the outcome of this message.
This listener is invoked on a background thread.
public PaginatedResult<Message> history(Param[] params) throws AblyException
params - the request params. See the Ably REST API
documentation for more details.AblyExceptionpublic void historyAsync(Param[] params, Callback<AsyncPaginatedResult<Message>> callback)
params - the request params. See the Ably REST APIcallback -