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

Quick Search    Search Deep

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

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

public class ElvisRequest
extends java.lang.Object

ElvisRequest implements an enumeration of the requests that a client may send to Elvis. See the individual requests for details of what they do.

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

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

Field Summary
private static java.util.Hashtable knownRequests
           
(package private)  java.lang.String name
           
static ElvisRequest PERFORM
          PERFORM is a request to invoke the default ElvisHandler for this program.
static ElvisRequest PING
          PING is basically a request to see if the other Elvis is there.
 
Constructor Summary
private ElvisRequest(java.lang.String name)
          Creates new ElvisRequest
 
Method Summary
 java.lang.String toString()
          Return the String associated with this request.
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

knownRequests

private static java.util.Hashtable knownRequests

PING

public static final ElvisRequest PING
PING is basically a request to see if the other Elvis is there. If the receiving Elvis is indeed an Elvis, it will respond with another ElvisMessage. If the receiving Elvis implements the same program with the same key as this Elvis, the response message will be ElvisResponse.OK; otherwise the response will be ElvisResponse.FAIL


PERFORM

public static final ElvisRequest PERFORM
PERFORM is a request to invoke the default ElvisHandler for this program. The data portion of the ElvisMessage will be passed to the ElvisHandler.


name

java.lang.String name
Constructor Detail

ElvisRequest

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

Method Detail

toString

public java.lang.String toString()
Return the String associated with this request. This is useful for printing diagnostics and feedback.


valid

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