|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Command interface defines the client side for fundamental command functionality. A command encapsulates the set of operations that makes up a business task. Commands provide the following advantages over conventional client-server interaction:
The Command interface is extended by both the TargetableCommand and CompensableCommand interfaces, which offer additional features. The TargetableCommandImpl abstract class, which implements many of the features of the TargetableCommand interface, provides a runtime for command execution.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Method Summary | |
---|---|
void |
execute()
Executes the task encapsulated by this command. |
boolean |
isReadyToCallExecute()
Indicates if all required input properties have been set. |
void |
reset()
Sets the output properties to the values they had before the the execute() method was run. |
Field Detail |
public static final long serialVersionUID
Method Detail |
public void execute() throws CommandException
This method is implemented in the TargetableCommandImpl class.
CommandException
- The superclass for all command exceptions.
Specifically, UnsetInputPropertiesException is thrown if the
isReadyToCallExecute() method returns false.public boolean isReadyToCallExecute()
The programmer must determine the conditions under which a command is considered ready to run and implement this abstract method appropriately.
public void reset()
The programmer must determine how to reset the input properties and implement this abstract method accordingly.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |