Class InstanceControlWebService
- java.lang.Object
-
- de.aristaflow.ilm.ws.base.service.AbstractSubResourceWebService<InstanceControl>
-
- de.aristaflow.ilm.ws.core.executionmanager.InstanceControlWebService
-
public class InstanceControlWebService extends AbstractSubResourceWebService<InstanceControl>
- See Also:
InstanceControl
-
-
Field Summary
Fields Modifier and Type Field Description protected ExecutionFactoryefprotected LocalInstanceStateNotifierlisnprotected ConcurrentMap<UUID,InstanceStateNotificationWrapper>listenersThe map containing all registered instance state listeners (viaInstanceStateCallback) indexed by instance ID.protected longREM_IT_ALIVE_TIME_EXTENSIONThe time in milliseconds to extend the remote iterator alive time after each access.protected longREM_IT_INIT_ALIVE_TIMEThe time in milliseconds to keep a remote iterator alive after creating it and before accessing it.protected TemplIdRemoteIteratorWebServicetiriwsThe web service for remote iterator handlers for template IDs.protected TemplRefRemoteIteratorWebServicetrriwsThe web service for remote iterator handlers for template references.
-
Constructor Summary
Constructors Constructor Description InstanceControlWebService(InstanceControl service, ExecutionManagerWebService parent, TemplIdRemoteIteratorWebService tiriws)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull @Valid ConsistencyCheckResponsecheckForAndFixInconsistencies(@NotNull @Valid SessionToken session, @NotNull UUID instId, Boolean considerRunning)@NotNull @Valid DataContainercreateInstanceDataContainer(@NotNull @Valid SessionToken session, @NotNull UUID templId)@Valid TemplIdInitialRemoteIteratorDatagetInstantiableTemplates(@NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive Integer count)@Valid TemplRefInitialRemoteIteratorDatagetInstantiableTemplRefs(@NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive Integer count)TemplRefRemoteIteratorWebServicegetInstTemplRefRemoteIteratorWebService()@NotNull @Valid InputDataContextgetPublicDataContext(@NotNull @Valid SessionToken session, @NotNull UUID instId)TemplIdRemoteIteratorWebServicegetTemplIdRemoteIteratorWebService()@Valid TemplRefInitialRemoteIteratorDatagetTemplRefs(@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, @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 URI[]wrap(SessionToken session, UUID instId, InstanceStateCallback callback)-
Methods inherited from class de.aristaflow.ilm.ws.base.service.AbstractSubResourceWebService
getLogger, getLogService, getService, getServiceMetaData, getServiceUris, getSessionFactory
-
-
-
-
Field Detail
-
REM_IT_INIT_ALIVE_TIME
protected final long REM_IT_INIT_ALIVE_TIME
The 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_EXTENSION
The time in milliseconds to extend the remote iterator alive time after each access.
-
tiriws
protected final TemplIdRemoteIteratorWebService tiriws
The web service for remote iterator handlers for template IDs.
-
trriws
protected final TemplRefRemoteIteratorWebService trriws
The web service for remote iterator handlers for template references.
-
ef
protected final ExecutionFactory ef
-
lisn
protected final LocalInstanceStateNotifier lisn
-
listeners
protected final ConcurrentMap<UUID,InstanceStateNotificationWrapper> listeners
The map containing all registered instance state listeners (viaInstanceStateCallback) indexed by instance ID.
-
-
Constructor Detail
-
InstanceControlWebService
public InstanceControlWebService(InstanceControl service, ExecutionManagerWebService parent, TemplIdRemoteIteratorWebService tiriws) throws ServiceNotKnownException
- Throws:
ServiceNotKnownException
-
-
Method Detail
-
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
public TemplIdRemoteIteratorWebService getTemplIdRemoteIteratorWebService()
-
getInstTemplRefRemoteIteratorWebService
public TemplRefRemoteIteratorWebService 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[])
-
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:
InstanceControl.getInstantiableTemplates(de.aristaflow.adept2.base.sessionmanagement.SessionToken, boolean),InstanceControl.getInstantiableTemplatesIterator(de.aristaflow.adept2.base.sessionmanagement.SessionToken, boolean)
-
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:
InstanceControl.getInstantiableTemplateReferences(de.aristaflow.adept2.base.sessionmanagement.SessionToken, boolean),InstanceControl.getInstantiableTemplateReferencesIterator(de.aristaflow.adept2.base.sessionmanagement.SessionToken, boolean)
-
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 URI[] wrap(SessionToken session, UUID instId, InstanceStateCallback callback)
-
-