This identifier can be used to abort the execution of the command
accociated with that identifier. Note that it is generally not
necessary to obtain a new id for each command, because commands are
executed synchronously. So the id for a command is valid again after a
command previously associated with this id has finished. In fact you
only should get one identifier per thread and assign it to every
command executed by that thread.
Common command definitions can be found in the soecification of the
service Content.
Parameter aCommand
is the command to execute.
Parameter CommandId
is a unique id for the command. This identifier was obtained by calling
XCommandProcessor::createCommandIdentifier. A value of
zero can be used, if the command never shall be aborted. Different
threads MUST NOT share one command identifier (except 0).
This can easily achieved, if every thread that wants to use an
XCommandProcessor, obtains exactly one identifier
using XCommandProcessor::createCommandIdentifier.
This identifier can be used for every call to
XCommandProcessor::execute done by that thread.
Parameter Environment
is the execution environment.
Returns
the result according to the specification of the command.
Throws
CommandAbortedException
to indicate that the command was aborted.
Throws
DuplicateCommandIdentifierException
to indicate that two threads tried to use the same command identifier
Throws
Exception
if an error occured during the execution of the command.
Not every command can be aborted. It's up to the implementation
to decide whether this method will actually end the processing of
the command or simply do nothing.
Parameter CommandId
is a unique id for the command to abort. This must be the identifier
passed to XCommandProcessor::execute for the command
to abort.