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 ExecutionFactory
ef
protected LocalInstanceStateNotifier
lisn
protected ConcurrentMap<UUID,InstanceStateNotificationWrapper>
listeners
The map containing all registered instance state listeners (viaInstanceStateCallback
) indexed by instance ID.protected long
REM_IT_ALIVE_TIME_EXTENSION
The time in milliseconds to extend the remote iterator alive time after each access.protected long
REM_IT_INIT_ALIVE_TIME
The time in milliseconds to keep a remote iterator alive after creating it and before accessing it.protected TemplIdRemoteIteratorWebService
tiriws
The web service for remote iterator handlers for template IDs.protected TemplRefRemoteIteratorWebService
trriws
The 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 ConsistencyCheckResponse
checkForAndFixInconsistencies(@NotNull @Valid SessionToken session, @NotNull UUID instId, Boolean considerRunning)
@NotNull @Valid DataContainer
createInstanceDataContainer(@NotNull @Valid SessionToken session, @NotNull UUID templId)
@Valid TemplIdInitialRemoteIteratorData
getInstantiableTemplates(@NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive Integer count)
@Valid TemplRefInitialRemoteIteratorData
getInstantiableTemplRefs(@NotNull @Valid SessionToken session, Boolean includeOutdated, @Positive Integer count)
TemplRefRemoteIteratorWebService
getInstTemplRefRemoteIteratorWebService()
@NotNull @Valid InputDataContext
getPublicDataContext(@NotNull @Valid SessionToken session, @NotNull UUID instId)
TemplIdRemoteIteratorWebService
getTemplIdRemoteIteratorWebService()
@Valid TemplRefInitialRemoteIteratorData
getTemplRefs(@NotNull @Valid SessionToken session, @NotEmpty List<UUID> templIds, @Positive Integer count)
void
resumeInstance(@NotNull @Valid SessionToken session, @NotNull UUID instId, InstanceStateCallback callback)
void
shutdown()
Shuts down this sub resource web service.@NotNull InstIdPair
startInstance(@NotNull @Valid SessionToken session, @NotNull UUID templId, @Valid DataContainer dc, ProcessConstants.ExecutionMode execMode, List<URI> rtMgr, InstanceStateCallback callback)
void
stopAndAbortInstance(@NotNull @Valid SessionToken session, @NotNull UUID instId, @NotNull Long errorCode, String errorMsg, String state, Boolean propagateToRunningActs)
@NotNull Boolean
suspendInstance(@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:AbstractSubResourceWebService
Shuts down this sub resource web service. This default implementation does nothing.- Overrides:
shutdown
in 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:
ParameterException
InvalidTemplateStateException
InvalidDataContainerException
- 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:
ParameterException
DataSourceException
DataConsistencyException
- 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:
ParameterException
DataSourceException
DataConsistencyException
- 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)
-
-