|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IpCommandHandler
The IpCommandHandler
interface defined methods to be
implemented by command handlers. A command handler can be added
added to an IpObject instance via its
addCommandHandler
method:
obj.addCommandHandler(handler);
When the object's exec
method is later called, the
command handlers will be invoked, one after the other, to handle
the command expression given as a parameter to exec
.
Method Summary | |
---|---|
java.lang.String |
handleCommand(java.lang.String command,
java.lang.String[] args)
Execute a command and return the result as a string, or null if the command wasn't handled. |
Method Detail |
---|
java.lang.String handleCommand(java.lang.String command, java.lang.String[] args) throws IpException
null
if the command wasn't handled.
Note that if null
is returned, the handler is
assumed to have NOT handled the command, which means that
another handler may be invoked. Thus, a string value should
always be returned if the command was handled. If the command
has no real return value, an empty string should be returned:
return new String();
command
- The name of the commandargs
- An array of command arguments
IpException
- if the command couldn't be executed for
some reason
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |