Package javax.jmdns.impl.constants
Enum DNSState
- java.lang.Object
-
- java.lang.Enum<DNSState>
-
- javax.jmdns.impl.constants.DNSState
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDNSState.StateClass
-
Enum Constant Summary
Enum Constants Enum Constant Description ANNOUNCEDANNOUNCING_1ANNOUNCING_2CANCELEDCANCELING_1CANCELING_2CANCELING_3CLOSEDCLOSINGPROBING_1PROBING_2PROBING_3
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String_nameprivate DNSState.StateClass_state
-
Constructor Summary
Constructors Modifier Constructor Description privateDNSState(java.lang.String name, DNSState.StateClass state)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DNSStateadvance()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.booleanisAnnounced()Returns true, if this is an announced state.booleanisAnnouncing()Returns true, if this is an announcing state.booleanisCanceled()Returns true, if this is a canceled state.booleanisCanceling()Returns true, if this is a canceling state.booleanisClosed()Returns true, if this is a closing state.booleanisClosing()Returns true, if this is a closing state.booleanisProbing()Returns true, if this is a probing state.DNSStaterevert()Returns to the next reverted state.java.lang.StringtoString()static DNSStatevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DNSState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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
-
-
Field Detail
-
_name
private final java.lang.String _name
-
_state
private final DNSState.StateClass _state
-
-
Constructor Detail
-
DNSState
private DNSState(java.lang.String name, DNSState.StateClass state)
-
-
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(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 namejava.lang.NullPointerException- if the argument is null
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<DNSState>
-
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:
trueif probing state,falseotherwise
-
isAnnouncing
public final boolean isAnnouncing()
Returns true, if this is an announcing state.- Returns:
trueif announcing state,falseotherwise
-
isAnnounced
public final boolean isAnnounced()
Returns true, if this is an announced state.- Returns:
trueif announced state,falseotherwise
-
isCanceling
public final boolean isCanceling()
Returns true, if this is a canceling state.- Returns:
trueif canceling state,falseotherwise
-
isCanceled
public final boolean isCanceled()
Returns true, if this is a canceled state.- Returns:
trueif canceled state,falseotherwise
-
isClosing
public final boolean isClosing()
Returns true, if this is a closing state.- Returns:
trueif closing state,falseotherwise
-
isClosed
public final boolean isClosed()
Returns true, if this is a closing state.- Returns:
trueif closed state,falseotherwise
-
-