java.lang.Object
com.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 $
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
ElvisRequest
private ElvisRequest(java.lang.String name)
- Creates new ElvisRequest
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)