Enum DNSState

  • All Implemented Interfaces:
    Serializable, Comparable<DNSState>

    public enum DNSState
    extends Enum<DNSState>
    DNSState defines the possible states for services registered with JmDNS.
    Author:
    Werner Randelshofer, Rick Blair, Pierre Frisch
    • Enum Constant Detail

      • PROBING_1

        public static final DNSState PROBING_1
      • PROBING_2

        public static final DNSState PROBING_2
      • PROBING_3

        public static final DNSState PROBING_3
      • ANNOUNCING_1

        public static final DNSState ANNOUNCING_1
      • ANNOUNCING_2

        public static final DNSState ANNOUNCING_2
      • ANNOUNCED

        public static final DNSState ANNOUNCED
      • CANCELING_1

        public static final DNSState CANCELING_1
      • CANCELING_2

        public static final DNSState CANCELING_2
      • CANCELING_3

        public static final DNSState CANCELING_3
      • CANCELED

        public static final DNSState CANCELED
      • CLOSING

        public static final DNSState CLOSING
      • CLOSED

        public static final DNSState CLOSED
    • Method Detail

      • values

        public static DNSState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DNSState c : DNSState.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DNSState valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • advance

        public final DNSState advance()
        Returns the next advanced state.
        In general, this advances one step in the following sequence: PROBING_1, PROBING_2, PROBING_3, ANNOUNCING_1, ANNOUNCING_2, ANNOUNCED.
        or CANCELING_1, CANCELING_2, CANCELING_3, CANCELED Does not advance for ANNOUNCED and CANCELED state.
        Returns:
        next state
      • revert

        public final DNSState revert()
        Returns to the next reverted state. All states except CANCELED revert to PROBING_1. Status CANCELED does not revert.
        Returns:
        reverted state
      • isProbing

        public final boolean isProbing()
        Returns true, if this is a probing state.
        Returns:
        true if probing state, false otherwise
      • isAnnouncing

        public final boolean isAnnouncing()
        Returns true, if this is an announcing state.
        Returns:
        true if announcing state, false otherwise
      • isAnnounced

        public final boolean isAnnounced()
        Returns true, if this is an announced state.
        Returns:
        true if announced state, false otherwise
      • isCanceling

        public final boolean isCanceling()
        Returns true, if this is a canceling state.
        Returns:
        true if canceling state, false otherwise
      • isCanceled

        public final boolean isCanceled()
        Returns true, if this is a canceled state.
        Returns:
        true if canceled state, false otherwise
      • isClosing

        public final boolean isClosing()
        Returns true, if this is a closing state.
        Returns:
        true if closing state, false otherwise
      • isClosed

        public final boolean isClosed()
        Returns true, if this is a closing state.
        Returns:
        true if closed state, false otherwise