org.glassfish.cafe.api
Enum Reason

java.lang.Object
  extended by java.lang.Enum<Reason>
      extended by org.glassfish.cafe.api.Reason
All Implemented Interfaces:
Serializable, Comparable<Reason>

public enum Reason
extends Enum<Reason>

Reason for rejecting a participant. Each reason will be translated to corresponding response code by the CAFE container.

Author:
binod

Enum Constant Summary
BUSY
          The party is busy.
BUSY_EVERYWHERE
          It is busy everywhere.
DECLINE
          The request is declined.
ERROR
          An unexpected error occurred.
NOT_AVAILABLE
          The party is not available.
NOT_FOUND
          The party is not found.
TIMEOUT
          The operation timed out.
 
Method Summary
static Reason valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Reason[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NOT_FOUND

public static final Reason NOT_FOUND
The party is not found.


NOT_AVAILABLE

public static final Reason NOT_AVAILABLE
The party is not available.


BUSY

public static final Reason BUSY
The party is busy.


ERROR

public static final Reason ERROR
An unexpected error occurred.


TIMEOUT

public static final Reason TIMEOUT
The operation timed out.


BUSY_EVERYWHERE

public static final Reason BUSY_EVERYWHERE
It is busy everywhere.


DECLINE

public static final Reason DECLINE
The request is declined.

Method Detail

values

public static Reason[] 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 (Reason c : Reason.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Reason valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2010. All Rights Reserved.