CTX - The context type to use, can by any Component, service
or POJO.RET - The return type of the Command's proceedings.E - The exception type of the Command's erroneous termination.public interface Command<CTX,RET,E extends Exception> extends Resetable
Command (Command) represents an (atomic) operation applied
to a context encapsulated in an object (as of object oriented programming).
Usually a Command also provides means to undo its operation applied
before. The Command is created by a client (e.g. the business logic)
and passed to the Command-bus for execution.| Modifier and Type | Method and Description |
|---|---|
RET |
execute(CTX aContext)
|
RET execute(CTX aContext) throws E extends Exception
Command by providing it a context (being a
service, a Component or a POJO). The method works synchronously
and waits (blocks the caller#s thread) till a result is available.aContext - The target object (being a service, a Component
or a POJO) which is used by the Command to perform its
(atomic) operation.Command after execution or Void in
case this Command does not process a result.Exception - in case something went wrong.Copyright © 2015. All rights reserved.