Package io.ably.lib.realtime
Class AblyRealtime.Channels
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<java.lang.String,Channel>
-
- io.ably.lib.realtime.AblyRealtime.Channels
-
- All Implemented Interfaces:
java.io.Serializable,java.util.concurrent.ConcurrentMap<java.lang.String,Channel>,java.util.Map<java.lang.String,Channel>
- Enclosing class:
- AblyRealtime
public class AblyRealtime.Channels extends java.util.concurrent.ConcurrentHashMap<java.lang.String,Channel>
A collection of the Channels associated with this Realtime instance.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
java.util.concurrent.ConcurrentHashMap.KeySetView<K extends java.lang.Object,V extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description Channels()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Channelget(java.lang.String channelName)Get the named channel; if it does not already exist, create it with default options.Channelget(java.lang.String channelName, ChannelOptions channelOptions)Get the named channel and set the given options, creating it if it does not already exist.voidonChannelMessage(ITransport transport, ProtocolMessage msg)voidrelease(java.lang.String channelName)Remove this channel from this AblyRealtime instance.voidsuspendAll(ErrorInfo error, boolean notifyStateChange)-
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
-
-
-
-
Method Detail
-
get
public Channel get(java.lang.String channelName)
Get the named channel; if it does not already exist, create it with default options.- Parameters:
channelName- the name of the channel- Returns:
- the channel
-
get
public Channel get(java.lang.String channelName, ChannelOptions channelOptions) throws AblyException
Get the named channel and set the given options, creating it if it does not already exist.- Parameters:
channelName- the name of the channelchannelOptions- the options to set (null to clear options on an existing channel)- Returns:
- the channel
- Throws:
AblyException
-
release
public void release(java.lang.String channelName)
Remove this channel from this AblyRealtime instance. This detaches from the channel and releases all other resources associated with the channel in this client. This silently does nothing if the channel does not already exist.- Parameters:
channelName-
-
onChannelMessage
public void onChannelMessage(ITransport transport, ProtocolMessage msg)
-
suspendAll
public void suspendAll(ErrorInfo error, boolean notifyStateChange)
-
-