com.lafros.juice.cmds
Interface ICmd.IDisj
- All Superinterfaces:
- ICmd
- Enclosing interface:
- ICmd
public static interface ICmd.IDisj
- extends ICmd
implement this form if your command is 'disjointed'--one for which the
result might not be available immediately. Here, ICmd.execute()
is
invoked in the background, i.e. from a separate thread. However, it is
not necessary for your impl'n to use synchronized methods or
blocks, as this will be taken care of by the Exe.
Methods inherited from interface com.lafros.juice.cmds.ICmd |
execute |
before
String before()
throws Exception
- called first, in the foreground. If the impl'n determines that the
command should proceed, then a message should be returned,
telling the user what's happening. Note that '...' will be appended to
it by the Exe (to indicate execution in the background). The
message will be passed to the
ICmdsApp.postTrying(String)
impl'n (if supplied), just before ICmd.execute()
is invoked in
the background, and the calling
Exe.executeCmd()
returns true even though the result is
not yet available. Otherwise, null or an empty
String should be returned, and after() will be called
directly, with an argument set to true.
- Throws:
Exception
- This will be caught and passed to the ICmdsApp.postFailed(Exception)
impl'n (if supplied). Note that your
implementation should only declare those Exceptions which the compiler
obliges it to declare.
after
void after(boolean succeeded)
- called in the foreground upon return of
ICmd.execute()
.
- Parameters:
succeeded
- true unless execution cancelled or
execute() threw an exception
Copyright © 2001-2008 Latterfrosken Software Development Limited. All Rights Reserved.