public final class Actions
extends java.lang.Object
Action
related functionality.Modifier and Type | Field and Description |
---|---|
static ActionBindings |
EMPTY_ACTIONBINDINGS
An empty ActionBindings instance.
|
static SchedulableActionContext |
EMPTY_ACTIONCONTEXT
An empty SchedulableActionContext instance.
|
static ActionEngine |
EMPTY_ACTIONENGINE
An empty ActionEngine instance.
|
Modifier and Type | Method and Description |
---|---|
static <T> void |
copy(ActionContext<T> source,
SchedulableActionContext<T> target)
Copies context information to a target context (actor, bindings, initial delay and period).
|
static ActionBindings |
emptyActionBindings()
Creates an immutable empty
ActionBindings . |
static <T> SchedulableActionContext<T> |
emptyActionContext()
Creates an immutable empty
SchedulableActionContext . |
static ActionEngine |
emptyActionEngine()
Creates an immutable empty
ActionEngine . |
static <T extends java.util.concurrent.ExecutorService> |
requireNotShutdown(T executorService)
Validates the supplied service is not shutdown.
|
static ActionEngine |
requireNotStopped(ActionEngine engine)
Validates the supplied engine is not stopped.
|
static ActionBindings |
unmodifiableActionBindings(ActionBindings bindings)
Creates an immutable
ActionBindings . |
static ActionEngine |
unmodifiableActionEngine(ActionEngine engine)
Creates an immutable
ActionEngine . |
static <T> SchedulableActionContext<T> |
unschedulableActionContext(SchedulableActionContext<T> context)
Creates an immutable
SchedulableActionContext that ActionContext.cancel() and
ActionContext.await() can still be called. |
public static final ActionEngine EMPTY_ACTIONENGINE
public static final ActionBindings EMPTY_ACTIONBINDINGS
public static final SchedulableActionContext EMPTY_ACTIONCONTEXT
public static <T> void copy(ActionContext<T> source, SchedulableActionContext<T> target)
source
- Source context.target
- Target context.public static ActionBindings emptyActionBindings()
ActionBindings
.public static <T> SchedulableActionContext<T> emptyActionContext()
SchedulableActionContext
.public static ActionEngine emptyActionEngine()
ActionEngine
.public static <T extends java.util.concurrent.ExecutorService> T requireNotShutdown(T executorService)
executorService
- Service to check.public static ActionEngine requireNotStopped(ActionEngine engine) throws java.lang.IllegalStateException
engine
- Engine to check.java.lang.IllegalStateException
public static ActionBindings unmodifiableActionBindings(ActionBindings bindings)
ActionBindings
.bindings
- Bindings to wrap.public static ActionEngine unmodifiableActionEngine(ActionEngine engine)
ActionEngine
.engine
- engine to wrap.public static <T> SchedulableActionContext<T> unschedulableActionContext(SchedulableActionContext<T> context)
SchedulableActionContext
that ActionContext.cancel()
and
ActionContext.await()
can still be called.context
- Context to wrap.