public abstract class SimpleOperations extends Operations
Abstract class base to build a simple operations module.
| Constructor and Description |
|---|
SimpleOperations() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
execute(Task task,
SimpleOperation.Reference reference)
Executes an operation code within the context of a task.
|
protected static void |
fail()
Fails silently.
|
protected static void |
fail(Messages.Entry entry,
Object... params)
Fails with a message.
|
protected void |
register(String name,
Enum<?> code)
Registers an operation without filter.
|
protected void |
register(String name,
Enum<?> code,
Filter filter)
Registers an operation.
|
protected void |
register(String name,
Enum<?> code,
Optional<Filter> filter)
Registers an operation.
|
getParams, getRegistrations, getThisLogger, setUp, setUppublic abstract void execute(@Nonnull
Task task,
@Nonnull
SimpleOperation.Reference reference)
throws Task.ExecuteException,
Stack.AccessException
Must be implemented by each module.
task - Task executing the program.reference - Reference to the operation.Task.ExecuteException - when appropriate.Stack.AccessException - When raised by the stack.protected static void fail()
throws Task.ExecuteException
Task.ExecuteException - Always.protected static void fail(@Nonnull
Messages.Entry entry,
@Nonnull
Object... params)
throws Task.ExecuteException
entry - The message format.params - The message parameters.Task.ExecuteException - Always.protected final void register(@Nonnull
String name,
@Nonnull
Enum<?> code)
throws Operation.OverloadException
name - The operation name.code - The operation code.Operation.OverloadException - From Operation.register(java.util.Map<java.lang.String, org.rvpf.processor.engine.rpn.operation.Operation>).protected final void register(@Nonnull
String name,
@Nonnull
Enum<?> code,
@Nonnull
Filter filter)
throws Operation.OverloadException
name - The operation name.code - The operation code.filter - The operation overload filter.Operation.OverloadException - From Operation.register(java.util.Map<java.lang.String, org.rvpf.processor.engine.rpn.operation.Operation>).protected final void register(@Nonnull
String name,
@Nonnull
Enum<?> code,
@Nonnull
Optional<Filter> filter)
throws Operation.OverloadException
name - The operation name.code - The operation code.filter - The optional operation overload filter.Operation.OverloadException - From Operation.register(java.util.Map<java.lang.String, org.rvpf.processor.engine.rpn.operation.Operation>).Copyright © 2003-2019 Serge Brisson. All Rights Reserved.