Package io.ably.lib.realtime
Interface AblyRealtime.Channels
- All Superinterfaces:
ReadOnlyMap<java.lang.String,Channel>
- Enclosing class:
- AblyRealtime
public static interface AblyRealtime.Channels extends ReadOnlyMap<java.lang.String,Channel>
A collection of Channels associated with this Ably Realtime instance.
-
Method Summary
Modifier and Type Method Description Channelget(java.lang.String channelName)Creates a newChannelobject, or returns the existing channel object.Channelget(java.lang.String channelName, ChannelOptions channelOptions)Creates a newChannelobject, with the specifiedChannelOptions, or returns the existing channel object.voidrelease(java.lang.String channelName)Releases aChannelobject, deleting it, and enabling it to be garbage collected.Methods inherited from interface io.ably.lib.types.ReadOnlyMap
containsKey, containsValue, entrySet, get, isEmpty, keySet, size, values
-
Method Details
-
get
Creates a newChannelobject, or returns the existing channel object.Spec: RSN3a, RTS3a
- Parameters:
channelName- The channel name.- Returns:
- A
Channelobject.
-
get
Creates a newChannelobject, with the specifiedChannelOptions, or returns the existing channel object.Spec: RSN3c, RTS3c
- Parameters:
channelName- The channel name.channelOptions- AChannelOptionsobject.- Returns:
- A
Channelobject. - Throws:
AblyException
-
release
void release(java.lang.String channelName)Releases aChannelobject, deleting it, and enabling it to be garbage collected. It also removes any listeners associated with the channel. To release a channel, theChannelStatemust be INITIALIZED, DETACHED, or FAILED.Spec: RSN4, RTS4
- Parameters:
channelName- The channel name.
-