Class OperationContext

  • All Implemented Interfaces:
    AutoCloseable, Map<String,​Object>
    Direct Known Subclasses:
    RestOperationContext

    public class OperationContext
    extends AbstractMap<String,​Object>
    implements AutoCloseable
    An operation context. Holds context objects, a context parameters map and a list of operations to run.

    Context objects are:

    • The Operation Chain Input - optional. It will be used as the input for the first operation in the chain. If input is null then only VOID methods in the first operation will be matched.
    • A Core Session - which is optional and should be provided by the caller. (either at creation time as a constructor argument, either using the setCoreSession(CoreSession) method. When running the operation chain in asynchronous mode another session will be created by preserving the current session credentials.

    Each entry in the operation list contains the ID of the operation to be run and a map of operation parameters to use when initializing the operation.

    The context parameters map can be filled with contextual information by the caller. Each operation will be able to access the contextual data at runtime and to update it if needed.

    Author:
    Bogdan Stefanescu