CTX
- The context type to use, can by any Component
, service
or POJO.E
- The exception type of the Worker
's erroneous termination.@FunctionalInterface public interface Worker<CTX,E extends Exception>
Worker
represents an (atomic) operation applied to a context and
(in contrast to a Command
) not returning any result, all of which
encapsulated in an object (as of object oriented programming). A
Worker
providing means to undo its operation is defined by the
UndoableWorker
. A Worker
is created by a client (e.g. the
business logic) and passed to something like a command-bus or
command-processor for execution.Modifier and Type | Method and Description |
---|---|
void |
execute(CTX aContext)
|
Copyright © 2017. All rights reserved.