Package javax.jmdns.impl.constants
Enum DNSState
- All Implemented Interfaces:
Serializable
,Comparable<DNSState>
DNSState defines the possible states for services registered with JmDNS.
-
Nested Class Summary
Nested Classes -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.final boolean
Returns true, if this is an announced state.final boolean
Returns true, if this is an announcing state.final boolean
Returns true, if this is a canceled state.final boolean
Returns true, if this is a canceling state.final boolean
isClosed()
Returns true, if this is a closing state.final boolean
Returns true, if this is a closing state.final boolean
Returns true, if this is a probing state.final DNSState
revert()
Returns to the next reverted state.final String
toString()
static DNSState
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 Details
-
PROBING_1
-
PROBING_2
-
PROBING_3
-
ANNOUNCING_1
-
ANNOUNCING_2
-
ANNOUNCED
-
CANCELING_1
-
CANCELING_2
-
CANCELING_3
-
CANCELED
-
CLOSING
-
CLOSED
-
-
Field Details
-
_name
-
_state
-
-
Constructor Details
-
DNSState
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
toString
-
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
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
-