Interface ServicesClient
- All Superinterfaces:
ServiceOperations
- All Known Implementing Classes:
ServicesAasClient
Services client operations.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.services.ServiceOperations
ServiceOperations.StreamLogMode -
Field Summary
Fields inherited from interface de.iip_ecosphere.platform.services.ServiceOperations
EXC_ALREADY_KNOWN, OPTION_ARGS, OPTION_ENSEMBLE, OPTION_MEMLIMITS, OPTION_PARAMS, OPTION_SERVERS -
Method Summary
Modifier and TypeMethodDescriptionaddArtifactAsTask(String taskId, URI location) Adds an artifact (and transitively the contained services) to the management domain of this instance, e.g., by downloading it from an artifact/service store.de.iip_ecosphere.platform.support.aas.SubmodelElementCollectionReturns the collection with all artifacts of the resources this client was created for.de.iip_ecosphere.platform.support.aas.SubmodelElementCollectionReturns the collection with all services of the resources this client was created for.String[]getServices(String artifactId, boolean topLevelOnly) Returns the services associated to a givenartifactId.voidremoveArtifactAsTask(String taskId, String artifactId) Removes the artifact (and transitively its services) from the management domain of this instance.voidstartServiceAsTask(String taskId, String... serviceId) LikeServiceOperations.startService(String...)but reporting on the giventaskId.voidLikeServiceOperations.startService(Map, String...)but reporting on the giventaskId.voidstopServiceAsTask(String taskId, String... serviceId) LikeServiceOperations.stopService(String...)but reporting on the giventaskId.Methods inherited from interface de.iip_ecosphere.platform.services.ServiceOperations
activateService, addArtifact, getServiceInstanceCount, getServiceState, migrateService, passivateService, reconfigureService, removeArtifact, setServiceState, startService, startService, stopService, streamLog, switchToService, updateService
-
Method Details
-
getServices
Returns the services associated to a givenartifactId.- Parameters:
artifactId- the artifactId to search fortopLevelOnly- whether only top-level services or all shall be returned- Returns:
- the associated service ids, empty if none was found
-
getServices
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection getServices()Returns the collection with all services of the resources this client was created for.- Returns:
- the services collection, may be null for none
-
getArtifacts
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection getArtifacts()Returns the collection with all artifacts of the resources this client was created for.- Returns:
- the artifacts collection, may be null for none
-
startServiceAsTask
LikeServiceOperations.startService(String...)but reporting on the giventaskId.- Parameters:
taskId- the task id to report on (may be null, leads toServiceOperations.startService(String...))serviceId- the id(s) of the service(s)- Throws:
ExecutionException- in case that starting the service fails for some reason
-
startServiceAsTask
void startServiceAsTask(String taskId, Map<String, String> options, String... serviceId) throws ExecutionExceptionLikeServiceOperations.startService(Map, String...)but reporting on the giventaskId.- Parameters:
taskId- the task id to report on (may be null, leads toServiceOperations.startService(Map, String...))options- optional map of optional options, seeServiceOperations.startService(Map, String...)serviceId- the id(s) of the service(s)- Throws:
ExecutionException- in case that starting the service fails for some reason
-
stopServiceAsTask
LikeServiceOperations.stopService(String...)but reporting on the giventaskId.- Parameters:
taskId- the task id to report on (may be null, leads toServiceOperations.stopService(String...))serviceId- the id(s) of the service(s) to stop- Throws:
ExecutionException- if stopping the service fails
-
addArtifactAsTask
Adds an artifact (and transitively the contained services) to the management domain of this instance, e.g., by downloading it from an artifact/service store. This defines theidof the service within the management domain of this instance. After a successful execution, the artifactidis returned, artifact and service(s) shall be available and the service(s) shall be in stateServiceState.AVAILABLE.- Parameters:
taskId- the task id to report on (may be null, leads toServiceOperations.addArtifact(URI))location- the location from where to download the service, e.g., an URL- Returns:
- the id of the artifact
- Throws:
ExecutionException- in case that adding the service fails for some reason
-
removeArtifactAsTask
Removes the artifact (and transitively its services) from the management domain of this instance. This operation shall only remove the implementation of non-operational services and, thus, perform a state transition toServiceState.UNDEPLOYINGand ultimately the service(s) shall be removed and their descriptors (including the artifact descriptor) shall not be available anymore.- Parameters:
taskId- the task id to report on (may be null, leads toServiceOperations.removeArtifact(String))artifactId- the id of the artifact to remove, or as fallback the canonical URI of the artifact- Throws:
ExecutionException- if removing the service fails, e.g., because it is still running
-