Class InstanceControlWebService
java.lang.Object
de.aristaflow.ilm.ws.base.service.AbstractSubResourceWebService<InstanceControl>
de.aristaflow.ilm.ws.core.executionmanager.InstanceControlWebService
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ExecutionFactoryprotected final LocalInstanceStateNotifierprotected final ConcurrentMap<UUID,InstanceStateNotificationWrapper> The map containing all registered instance state listeners (viaInstanceStateCallback) indexed by instance ID.protected final longThe time in milliseconds to extend the remote iterator alive time after each access.protected final longThe time in milliseconds to keep a remote iterator alive after creating it and before accessing it.protected final TemplIdRemoteIteratorWebServiceThe web service for remote iterator handlers for template IDs.protected final TemplRefRemoteIteratorWebServiceThe web service for remote iterator handlers for template references. -
Constructor Summary
ConstructorsConstructorDescriptionInstanceControlWebService(InstanceControl service, ExecutionManagerWebService parent, TemplIdRemoteIteratorWebService tiriws) -
Method Summary
Modifier and TypeMethodDescription@NotNull @Valid ConsistencyCheckResponsecheckForAndFixInconsistencies(@NotNull @Valid SessionToken session, @NotNull UUID instId, Boolean considerRunning) @NotNull @Valid DataContainercreateInstanceDataContainer(@NotNull @Valid SessionToken session, @NotNull UUID templId) getInstantiableTemplates(@NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive Integer count) getInstantiableTemplRefs(@NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive Integer count) @NotNull @Valid InputDataContextgetPublicDataContext(@NotNull @Valid SessionToken session, @NotNull UUID instId) getTemplRefs(@NotNull @Valid SessionToken session, @NotEmpty List<UUID> templIds, @Positive Integer count) voidresumeInstance(@NotNull @Valid SessionToken session, @NotNull UUID instId, InstanceStateCallback callback) voidshutdown()Shuts down this sub resource web service.@NotNull InstIdPairstartInstance(@NotNull @Valid SessionToken session, @NotEmpty String processType, List<@NotNull @Valid ParameterValue> inputValues, List<URI> rtMgr, InstanceStateCallback callback) @NotNull InstIdPairstartInstance(@NotNull @Valid SessionToken session, @NotNull UUID templId, @Valid DataContainer dc, ProcessConstants.ExecutionMode execMode, List<URI> rtMgr, InstanceStateCallback callback) voidstopAndAbortInstance(@NotNull @Valid SessionToken session, @NotNull UUID instId, @NotNull Long errorCode, String errorMsg, String state, Boolean propagateToRunningActs) @NotNull BooleansuspendInstance(@NotNull @Valid SessionToken session, @NotNull UUID instId, Boolean propagateToRunningActs) protected voidunwrap(UUID instId, InstanceStateNotificationWrapper isn, InstanceStateNotificationWrapper replaced) Undoes the wrapping for a resume which has failed.protected InstanceStateNotificationWrapperwrap(SessionToken session, UUID instId, InstanceStateCallback callback) Wraps the designated callback for resuming the designated instance and registers the wrapper in place of the one registered for the instance before.Methods inherited from class de.aristaflow.ilm.ws.base.service.AbstractSubResourceWebService
getLogger, getLogService, getService, getServiceMetaData, getServiceUris, getSessionFactory
-
Field Details
-
REM_IT_INIT_ALIVE_TIME
protected final long REM_IT_INIT_ALIVE_TIMEThe time in milliseconds to keep a remote iterator alive after creating it and before accessing it. -
REM_IT_ALIVE_TIME_EXTENSION
protected final long REM_IT_ALIVE_TIME_EXTENSIONThe time in milliseconds to extend the remote iterator alive time after each access. -
tiriws
The web service for remote iterator handlers for template IDs. -
trriws
The web service for remote iterator handlers for template references. -
ef
-
lisn
-
listeners
The map containing all registered instance state listeners (viaInstanceStateCallback) indexed by instance ID.
-
-
Constructor Details
-
InstanceControlWebService
public InstanceControlWebService(InstanceControl service, ExecutionManagerWebService parent, TemplIdRemoteIteratorWebService tiriws) throws ServiceNotKnownException - Throws:
ServiceNotKnownException
-
-
Method Details
-
shutdown
public void shutdown()Description copied from class:AbstractSubResourceWebServiceShuts down this sub resource web service. This default implementation does nothing.- Overrides:
shutdownin classAbstractSubResourceWebService<InstanceControl>
-
getTemplIdRemoteIteratorWebService
-
getInstTemplRefRemoteIteratorWebService
-
createInstanceDataContainer
@NotNull @Valid public @NotNull @Valid DataContainer createInstanceDataContainer(@NotNull @Valid @NotNull @Valid SessionToken session, @NotNull @NotNull UUID templId) throws ParameterException, InvalidDataContainerException -
getPublicDataContext
@NotNull @Valid public @NotNull @Valid InputDataContext getPublicDataContext(@NotNull @Valid @NotNull @Valid SessionToken session, @NotNull @NotNull UUID instId) throws ParameterException -
startInstance
@NotNull public @NotNull InstIdPair startInstance(@NotNull @Valid @NotNull @Valid SessionToken session, @NotNull @NotNull UUID templId, @Valid @Valid DataContainer dc, ProcessConstants.ExecutionMode execMode, List<URI> rtMgr, InstanceStateCallback callback) throws ParameterException, InvalidTemplateStateException, InvalidDataContainerException - Throws:
ParameterExceptionInvalidTemplateStateExceptionInvalidDataContainerException- See Also:
-
InstanceControl.startInstance(de.aristaflow.adept2.base.sessionmanagement.SessionToken, UUID, URI[])InstanceControl.startInstance(de.aristaflow.adept2.base.sessionmanagement.SessionToken, UUID, URI[], URI[])InstanceControl.startInstance(de.aristaflow.adept2.base.sessionmanagement.SessionToken, UUID, de.aristaflow.adept2.model.execution.ExecutionContext, URI[], URI[])
-
startInstance
@NotNull public @NotNull InstIdPair startInstance(@NotNull @Valid @NotNull @Valid SessionToken session, @NotEmpty @NotEmpty String processType, List<@NotNull @Valid ParameterValue> inputValues, List<URI> rtMgr, InstanceStateCallback callback) throws ParameterException, InvalidTemplateStateException, InvalidDataContainerException -
getInstantiableTemplates
@Valid public @Valid TemplIdInitialRemoteIteratorData getInstantiableTemplates(@NotNull @Valid @NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive @Positive Integer count) throws ParameterException, DataSourceException, DataConsistencyException - Throws:
ParameterExceptionDataSourceExceptionDataConsistencyException- See Also:
-
getTemplRefs
@Valid public @Valid TemplRefInitialRemoteIteratorData getTemplRefs(@NotNull @Valid @NotNull @Valid SessionToken session, @NotEmpty @NotEmpty List<UUID> templIds, @Positive @Positive Integer count) throws ParameterException, DataSourceException, DataConsistencyException -
getInstantiableTemplRefs
@Valid public @Valid TemplRefInitialRemoteIteratorData getInstantiableTemplRefs(@NotNull @Valid @NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive @Positive Integer count) throws ParameterException, DataSourceException, DataConsistencyException - Throws:
ParameterExceptionDataSourceExceptionDataConsistencyException- See Also:
-
checkForAndFixInconsistencies
@NotNull @Valid public @NotNull @Valid ConsistencyCheckResponse checkForAndFixInconsistencies(@NotNull @Valid @NotNull @Valid SessionToken session, @NotNull @NotNull UUID instId, Boolean considerRunning) throws ParameterException, DataConsistencyException -
suspendInstance
@NotNull public @NotNull Boolean suspendInstance(@NotNull @Valid @NotNull @Valid SessionToken session, @NotNull @NotNull UUID instId, Boolean propagateToRunningActs) throws ParameterException, InvalidInstanceStateException -
resumeInstance
public void resumeInstance(@NotNull @Valid @NotNull @Valid SessionToken session, @NotNull @NotNull UUID instId, InstanceStateCallback callback) throws ParameterException, InvalidInstanceStateException -
stopAndAbortInstance
public void stopAndAbortInstance(@NotNull @Valid @NotNull @Valid SessionToken session, @NotNull @NotNull UUID instId, @NotNull @NotNull Long errorCode, String errorMsg, String state, Boolean propagateToRunningActs) throws ParameterException, InvalidInstanceStateException -
wrap
protected InstanceStateNotificationWrapper wrap(SessionToken session, UUID instId, InstanceStateCallback callback) Wraps the designated callback for resuming the designated instance and registers the wrapper in place of the one registered for the instance before.- Parameters:
session- The session for registering and unregistering the wrapper.instId- The ID of the instance to resume.callback- The callback which to wrap.- Returns:
- The registered wrapper.
-
unwrap
protected void unwrap(UUID instId, InstanceStateNotificationWrapper isn, InstanceStateNotificationWrapper replaced) Undoes the wrapping for a resume which has failed. The designated wrapper is unregistered and the one it has replaced takes its place again.- Parameters:
instId- The ID of the instance which has failed to resume.isn- The wrapper which to unregister.replaced- The wrapper which the designated one has replaced ornull.
-