org.apache.activemq.jmdns
Class DNSState

java.lang.Object
  extended by org.apache.activemq.jmdns.DNSState
All Implemented Interfaces:
java.lang.Comparable

public class DNSState
extends java.lang.Object
implements java.lang.Comparable

DNSState defines the possible states for services registered with JmDNS.

Version:
1.0 May 23, 2004 Created.
Author:
Werner Randelshofer, Rick Blair

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(java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field 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

CANCELED

public static final DNSState CANCELED
Method Detail

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

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.


revert

public final DNSState revert()
Returns to the next reverted state. All states except CANCELED revert to PROBING_1. Status CANCELED does not revert.


isProbing

public boolean isProbing()
Returns true, if this is a probing state.


isAnnouncing

public boolean isAnnouncing()
Returns true, if this is an announcing state.


isAnnounced

public boolean isAnnounced()
Returns true, if this is an announced state.


compareTo

public int compareTo(java.lang.Object o)
Compares two states. The states compare as follows: PROBING_1 < PROBING_2 < PROBING_3 < ANNOUNCING_1 < ANNOUNCING_2 < RESPONDING < ANNOUNCED < CANCELED.

Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2005-2011. All Rights Reserved.