Interfaces for creating commands

The Command interface specifies the most basic aspects of a command. This interface is extended by both the TargetableCommand interface and the CompensableCommand interface, which offer additional features.

To create commands for applications, you must: In practice, most commands implement the TargetableCommand interface, which allows the command to be executed remotely. The following example shows the structure of a command interface for a targetable command:
... import com.ibm.websphere.command.*;
public interface MySimpleCommand extends TargetableCommand { // Declare application
methods here }
The CompensableCommand interface enables the association of one command with another that can undo the work of the first. Compensable commands also typically implement the TargetableCommand interface. The following example shows the structure of a command interface for a targetable, compensable command:
... import com.ibm.websphere.command.*;
public interface MyCommand extends TargetableCommand, CompensableCommand {
// Declare application methods here }



Related tasks
Writing command interfaces
Related reference
TargetableCommand interface
CompensableCommand interface


Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 4:28:44 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-mp&topic=rcmd_facs_create_cmds
File name: rcmd_facs_create_cmds.html