public interface RuntimeManager extends ADEPT2Service
| Modifier and Type | Method and Description |
|---|---|
void |
commit(SessionToken session,
EBPInstanceReference ebpInstanceReference)
Instructs the runtime manager to inform the specified activity about the
commit of the transaction it participated.
|
ExecutionControlManager |
getExecutionControlManager()
Gets a manager for controlling the execution of an activity, for instance,
finishing, suspending,...
|
SynchronousActivityStarting |
getSynchronousActivityStarting()
Gets an interface for synchronously starting/resuming activities and
returning the
GUIContext of the started/resumed activity. |
java.util.Map<EBPInstanceReference,ProcessConstants.NodeState> |
logoffAndTerminateActivities(SessionToken session,
QualifiedAgent agent,
boolean forceTermination)
Logs the agent off that is identified by the designated client session
factory.
|
void |
logon(SessionToken session,
ClientSessionFactory clientSessionFactory)
Logs the agent on that is identified by the designated session token and
stores the corresponding client session factory for communicating component
signals to the execution manager.
|
boolean |
preferAutoStartNotification()
Gets whether this runtime manager prefers to be notified of pending autostart activities
instead of the activities directly being pushed to be started within this runtime manager.
|
Vote |
prepareCommit(SessionToken session,
EBPInstanceReference ebpInstanceReference)
Instructs the runtime manager to prepare the specified activity for
committing its work done within the transaction it participated.
|
void |
resumeActivity(SessionToken session,
EBPInstanceReference ebpInstanceReference,
ExecutionContext executionContext)
Instructs the runtime manager to resume the specified activity.
|
void |
rollbackActivity(SessionToken session,
EBPInstanceReference ebpInstanceReference)
Instructs the runtime manager to instruct the specified activity to
rollback its work done within the transaction it participated.
|
void |
startActivity(SessionToken session,
EBPInstanceReference ebpInstanceReference,
ExecutionContext executionContext)
Instructs the runtime manager to start the Application assigned to the
specified activity.
|
void |
updateClientSessionFactory(SessionToken session,
ClientSessionFactory csf)
Updates the designated client session factory.
|
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startboolean preferAutoStartNotification()
void logon(SessionToken session, ClientSessionFactory clientSessionFactory)
session - The session token identifying the agent to execute
activities on this runtime manager.clientSessionFactory - A client session factory for the designated
agent.ServiceAccessControlException - If
the designated session token or a session token of the designated
client session factory has no integrity, a
ServiceAccessControlException will be thrown.void updateClientSessionFactory(SessionToken session, ClientSessionFactory csf)
session - The session token identifying the agent for whom to update the client session
factory.csf - The new client session factory with which to replace the old one.ServiceAccessControlException - If the designated
session token or a session token of the designated client session factory has no
integrity, a ServiceAccessControlException will be thrown.java.util.Map<EBPInstanceReference,ProcessConstants.NodeState> logoffAndTerminateActivities(SessionToken session, QualifiedAgent agent, boolean forceTermination)
ExecutionControlManager.getActivities(SessionToken, de.aristaflow.adept2.model.runtimeenvironment.ActivityState.State[])
beforehand.
The returned map contains all activities that have been running when
calling this method mapped to their state after executing this method.
Their state is represented as ProcessConstants.NodeState as follows:
Implementations have to be synchronised correctly, since a logoff can happen concurrently to starting or resuming an activity. ensure to only allow to execute activities for the logged on agents. And only these client session factories must be used!
session - The session which is used to check for access rights on this
method and for synchronising against concurrent starting/resuming.agent - The agent to logoff from this runtime manager.forceTermination - Whether unsuspensible activities should be reset or
aborted instead of continue to run.ServiceAccessControlException - If
the designated session token has no integrity, a
ServiceAccessControlException will be thrown.void startActivity(SessionToken session, EBPInstanceReference ebpInstanceReference, ExecutionContext executionContext) throws AgentUnknownException
session - The session which is used to check for access rights on this
method and to synchronise the instance access in the execution
manager.ebpInstanceReference - identifies the activity to be executedexecutionContext - keeps all the information necessary to execute the
specified application.AgentUnknownException - If the agent identified by the designated
session token is not known to this runtime manager.EBPInstanceReference,
ExecutionContextvoid resumeActivity(SessionToken session, EBPInstanceReference ebpInstanceReference, ExecutionContext executionContext) throws AgentUnknownException
session - The session which is used to check for access rights on this
method and to synchronise the instance access in the execution
manager.ebpInstanceReference - identifies the activity to be resumedexecutionContext - the context that keeps all the information
necessary to identify the application to be runAgentUnknownException - If the agent identified by the designated
session token is not known to this runtime managerVote prepareCommit(SessionToken session, EBPInstanceReference ebpInstanceReference)
session - The session which is used to check for access rights on this
method and to synchronise the instance access in the execution
manager.ebpInstanceReference - the identifier of the activity that should prepare
for commitvoid commit(SessionToken session, EBPInstanceReference ebpInstanceReference)
session - The session which is used to check for access rights on this
method and to synchronise the instance access in the execution
manager.ebpInstanceReference - the identifier of the activity that should
commit its work.void rollbackActivity(SessionToken session, EBPInstanceReference ebpInstanceReference)
prepareCommit or abortActivity have to
be called prior to a rollback.session - The session which is used to check for access rights on this
method and to synchronise the instance access in the execution
manager.ebpInstanceReference - the identifier of the activity the should rollback
its work.ExecutionControlManager getExecutionControlManager()
SynchronousActivityStarting getSynchronousActivityStarting()
GUIContext of the started/resumed activity. A
runtime manager does not need to support this. In this case
null is returned and the caller needs to use the execution
manager directly.null in case this runtime manager does not support
this.