|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.au.Command
public abstract class Command
Represents a command of a request (AuRequest).
Each command is unique no matter getId() is the same or not.
All commands must be declared as static members of AuRequest
such that they will be initialized sequentially at begining.
Also, if a command will generate an event, it shall register the
event in its constructor.
| Field Summary | |
|---|---|
static int |
CTRL_GROUP
Whether this command belongs to the control group. |
static int |
IGNORABLE
Whether this command is ignorable. |
static int |
IGNORE_IMMEDIATE_OLD_EQUIV
Whether to drop the existent command (in the queue) if it is the same as the immediate following one. |
static int |
IGNORE_OLD_EQUIV
Whether to drop the existent command (in the queue) if it is the same as the new arrival one. |
static int |
SKIP_IF_EVER_ERROR
Whether to skip this command if previous commands ever caused errors. |
| Constructor Summary | |
|---|---|
protected |
Command(java.lang.String id,
int flags)
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
int |
getFlags()
Returns the attributes of this command, a combination of SKIP_IF_EVER_ERROR, IGNORABLE and others. |
java.lang.String |
getId()
Returns ID of this command. |
protected abstract void |
process(AuRequest request)
Derived must override this method to process this command. |
void |
process(AuRequest request,
boolean everError)
Called to process the specified request. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SKIP_IF_EVER_ERROR
process(AuRequest,boolean) is called with errorEver = true;
This argument is used to control the behavior of
process(AuRequest,boolean).
Part of the returned value of getFlags().
public static final int IGNORABLE
Part of the returned value of getFlags().
public static final int CTRL_GROUP
public static final int IGNORE_OLD_EQUIV
public static final int IGNORE_IMMEDIATE_OLD_EQUIV
| Constructor Detail |
|---|
protected Command(java.lang.String id,
int flags)
flags - a combination of SKIP_IF_EVER_ERROR,
IGNORABLE and others| Method Detail |
|---|
public final int getFlags()
SKIP_IF_EVER_ERROR, IGNORABLE and others.
public final java.lang.String getId()
public final java.lang.String toString()
toString in class java.lang.Objectpublic final boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected abstract void process(AuRequest request)
public final void process(AuRequest request,
boolean everError)
process(AuRequest).
everError - whether any error ever occured before
processing this command.
Notice that multiple commands might be processed in one
execution.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||