Class 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>
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<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
      Channel get​(java.lang.String channelName)
      Get the named channel; if it does not already exist, create it with default options.
      Channel get​(java.lang.String channelName, ChannelOptions channelOptions)
      Get the named channel and set the given options, creating it if it does not already exist.
      void onChannelMessage​(ITransport transport, ProtocolMessage msg)  
      void release​(java.lang.String channelName)
      Remove this channel from this AblyRealtime instance.
      void suspendAll​(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
      • Methods inherited from class java.util.AbstractMap

        clone
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Channels

        public Channels()
    • 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 channel
        channelOptions - 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 -
      • suspendAll

        public void suspendAll​(ErrorInfo error,
                               boolean notifyStateChange)