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 class
DNSState.StateClass
-
Enum Constant Summary
Enum Constants Enum Constant Description ANNOUNCED
ANNOUNCING_1
ANNOUNCING_2
CANCELED
CANCELING_1
CANCELING_2
CANCELING_3
CLOSED
CLOSING
PROBING_1
PROBING_2
PROBING_3
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
_name
private DNSState.StateClass
_state
-
Constructor Summary
Constructors Modifier Constructor Description private
DNSState(java.lang.String name, DNSState.StateClass state)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
isAnnounced()
Returns true, if this is an announced state.boolean
isAnnouncing()
Returns true, if this is an announcing state.boolean
isCanceled()
Returns true, if this is a canceled state.boolean
isCanceling()
Returns true, if this is a canceling state.boolean
isClosed()
Returns true, if this is a closing state.boolean
isClosing()
Returns true, if this is a closing state.boolean
isProbing()
Returns true, if this is a probing state.DNSState
revert()
Returns to the next reverted state.java.lang.String
toString()
static DNSState
valueOf(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:
toString
in 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:
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
-
-