javax.jmdns.impl
Class DNSState
java.lang.Object
javax.jmdns.impl.DNSState
- Comparable
public class DNSState
extends java.lang.Object
implements Comparable
DNSState defines the possible states for services registered with JmDNS.
ANNOUNCED
public static final DNSState ANNOUNCED
ANNOUNCING_1
public static final DNSState ANNOUNCING_1
ANNOUNCING_2
public static final DNSState ANNOUNCING_2
CANCELED
public static final DNSState CANCELED
PROBING_1
public static final DNSState PROBING_1
PROBING_2
public static final DNSState PROBING_2
PROBING_3
public static final DNSState PROBING_3
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.
Does not advance for ANNOUNCED and CANCELED state.
compareTo
public int compareTo(Object o)
Compares two states.
The states compare as follows:
PROBING_1 < PROBING_2 < PROBING_3 < ANNOUNCING_1 <
ANNOUNCING_2 < RESPONDING < ANNOUNCED < CANCELED.
isAnnounced
public boolean isAnnounced()
Returns true, if this is an announced state.
isAnnouncing
public boolean isAnnouncing()
Returns true, if this is an announcing state.
isProbing
public boolean isProbing()
Returns true, if this is a probing 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.
toString
public final String toString()