Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.synaptics.elvis
Class ElvisResponse  view ElvisResponse download ElvisResponse.java

java.lang.Object
  extended bycom.synaptics.elvis.ElvisResponse

public class ElvisResponse
extends java.lang.Object

ElvisResponse implements an enumeration of the responses that an Elvis may send to its clients in response to ElvisRequests. See the individual responses for details of what they do.

ElvisResponse implements the typesafe enum design pattern, as described in Joshua Bloch's Effective Java.

Version:
$Id: ElvisResponse.java,v 1.1 2002/05/09 07:17:17 clheiny Exp $

Field Summary
static ElvisResponse FAIL
          FAIL indicates that Elvis is not happy with the request.
private static java.util.Hashtable knownResponse
           
(package private)  java.lang.String name
           
static ElvisResponse OK
          OK indicates that Elvis is happy with the request.
 
Constructor Summary
private ElvisResponse(java.lang.String name)
          Creates new ElvisResponse
 
Method Summary
 java.lang.String toString()
          Return the string value associated with this response.
static boolean valid(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

knownResponse

private static java.util.Hashtable knownResponse

OK

public static final ElvisResponse OK
OK indicates that Elvis is happy with the request.


FAIL

public static final ElvisResponse FAIL
FAIL indicates that Elvis is not happy with the request. The data field of the ElvisMessage may (or may not) contain information regarding the reason Elvis is displeased.


name

java.lang.String name
Constructor Detail

ElvisResponse

private ElvisResponse(java.lang.String name)
Creates new ElvisResponse

Method Detail

toString

public java.lang.String toString()
Return the string value associated with this response. Useful for printing diagnostics and other feedback.


valid

public static final boolean valid(java.lang.String name)