javax.jmdns.impl

Class DNSState

Implemented Interfaces:
Comparable

public class DNSState
extends java.lang.Object
implements Comparable

DNSState defines the possible states for services registered with JmDNS.

Field Summary

static DNSState
ANNOUNCED
static DNSState
ANNOUNCING_1
static DNSState
ANNOUNCING_2
static DNSState
CANCELED
static DNSState
PROBING_1
static DNSState
PROBING_2
static DNSState
PROBING_3

Method Summary

DNSState
advance()
Returns the next advanced state.
int
compareTo(Object o)
Compares two states.
boolean
isAnnounced()
Returns true, if this is an announced state.
boolean
isAnnouncing()
Returns true, if this is an announcing state.
boolean
isProbing()
Returns true, if this is a probing state.
DNSState
revert()
Returns to the next reverted state.
String
toString()

Field Details

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

Method Details

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()