Enum PresenceMessage.Action

java.lang.Object
java.lang.Enum<PresenceMessage.Action>
io.ably.lib.types.PresenceMessage.Action
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PresenceMessage.Action>, java.lang.constant.Constable
Enclosing class:
PresenceMessage

public static enum PresenceMessage.Action
extends java.lang.Enum<PresenceMessage.Action>
Describes the possible actions members in the presence set can emit.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    absent
    A member is not present in the channel.
    enter
    A new member has entered the channel.
    leave
    A member who was present has now left the channel.
    present
    When subscribing to presence events on a channel that already has members present, this event is emitted for every member already present on the channel before the subscribe listener was registered.
    update
    An already present member has updated their member data.
  • Method Summary

    Modifier and Type Method Description
    static PresenceMessage.Action findByValue​(int value)  
    int getValue()  
    static PresenceMessage.Action valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static PresenceMessage.Action[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • absent

      public static final PresenceMessage.Action absent
      A member is not present in the channel.

      Spec: TP2

    • present

      public static final PresenceMessage.Action present
      When subscribing to presence events on a channel that already has members present, this event is emitted for every member already present on the channel before the subscribe listener was registered.

      Spec: TP2

    • enter

      public static final PresenceMessage.Action enter
      A new member has entered the channel.

      Spec: TP2

    • leave

      public static final PresenceMessage.Action leave
      A member who was present has now left the channel. This may be a result of an explicit request to leave or implicitly when detaching from the channel. Alternatively, if a member's connection is abruptly disconnected and they do not resume their connection within a minute, Ably treats this as a leave event as the client is no longer present.

      Spec: TP2

    • update

      public static final PresenceMessage.Action update
      An already present member has updated their member data. Being notified of member data updates can be very useful, for example, it can be used to update the status of a user when they are typing a message.

      Spec: TP2

  • Method Details

    • values

      public static PresenceMessage.Action[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PresenceMessage.Action valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • getValue

      public int getValue()
    • findByValue

      public static PresenceMessage.Action findByValue​(int value)