Class ServiceMgrAndDescriptorTest.MockServiceManager
java.lang.Object
test.de.iip_ecosphere.platform.services.spring.ServiceMgrAndDescriptorTest.MockServiceManager
- All Implemented Interfaces:
de.iip_ecosphere.platform.services.ServiceManager,de.iip_ecosphere.platform.services.ServiceOperations
- Enclosing class:
ServiceMgrAndDescriptorTest
private static class ServiceMgrAndDescriptorTest.MockServiceManager
extends Object
implements de.iip_ecosphere.platform.services.ServiceManager
A mocking service manager for a given service artifact. Only selected functions are implemented!
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.services.ServiceOperations
de.iip_ecosphere.platform.services.ServiceOperations.StreamLogMode -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface de.iip_ecosphere.platform.services.ServiceManager
PROGRESS_COMPONENT_IDFields inherited from interface de.iip_ecosphere.platform.services.ServiceOperations
EXC_ALREADY_KNOWN, OPTION_ARGS, OPTION_ENSEMBLE, OPTION_MEMLIMITS, OPTION_PARAMS, OPTION_SERVERS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMockServiceManager(de.iip_ecosphere.platform.services.spring.SpringCloudArtifactDescriptor aDesc) Creates a service manager instance for the given artifact descriptor. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateService(String serviceId) addArtifact(URI location) voidcloneArtifact(String artifactId, URI location) de.iip_ecosphere.platform.services.ArtifactDescriptorgetArtifact(String artifactId) Collection<? extends de.iip_ecosphere.platform.services.ArtifactDescriptor> List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor> getInputDataConnectors(String serviceId) List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor> getOutputDataConnectors(String serviceId) List<de.iip_ecosphere.platform.services.TypedDataDescriptor> getParameters(String serviceId) de.iip_ecosphere.platform.services.ServiceDescriptorgetService(String serviceId) intgetServiceInstanceCount(String serviceId) Collection<? extends de.iip_ecosphere.platform.services.ServiceDescriptor> de.iip_ecosphere.platform.services.environment.ServiceStategetServiceState(String serviceId) voidmigrateService(String serviceId, String resourceId) voidpassivateService(String serviceId) voidreconfigureService(String serviceId, Map<String, String> values) voidremoveArtifact(String artifactId) voidsetServiceState(String serviceId, de.iip_ecosphere.platform.services.environment.ServiceState state) voidstartService(String... serviceId) voidstartService(Map<String, String> options, String... serviceId) voidstopService(String... serviceId) voidswitchToService(String serviceId, String targetId) voidupdateService(String serviceId, URI location) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.services.ServiceOperations
streamLog
-
Field Details
-
arts
-
svc
-
-
Constructor Details
-
MockServiceManager
private MockServiceManager(de.iip_ecosphere.platform.services.spring.SpringCloudArtifactDescriptor aDesc) Creates a service manager instance for the given artifact descriptor.- Parameters:
aDesc- the artifact descriptor to analyze
-
-
Method Details
-
updateService
- Specified by:
updateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
switchToService
- Specified by:
switchToServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
stopService
- Specified by:
stopServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
startService
- Specified by:
startServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
startService
- Specified by:
startServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
setServiceState
public void setServiceState(String serviceId, de.iip_ecosphere.platform.services.environment.ServiceState state) throws ExecutionException - Specified by:
setServiceStatein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
removeArtifact
- Specified by:
removeArtifactin interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
reconfigureService
public void reconfigureService(String serviceId, Map<String, String> values) throws ExecutionException- Specified by:
reconfigureServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
passivateService
- Specified by:
passivateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
migrateService
- Specified by:
migrateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
getServiceState
public de.iip_ecosphere.platform.services.environment.ServiceState getServiceState(String serviceId) - Specified by:
getServiceStatein interfacede.iip_ecosphere.platform.services.ServiceOperations
-
addArtifact
- Specified by:
addArtifactin interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
activateService
- Specified by:
activateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
ExecutionException
-
getServices
- Specified by:
getServicesin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getServiceIds
- Specified by:
getServiceIdsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getService
- Specified by:
getServicein interfacede.iip_ecosphere.platform.services.ServiceManager
-
getParameters
- Specified by:
getParametersin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getOutputDataConnectors
public List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor> getOutputDataConnectors(String serviceId) - Specified by:
getOutputDataConnectorsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getInputDataConnectors
public List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor> getInputDataConnectors(String serviceId) - Specified by:
getInputDataConnectorsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getArtifacts
- Specified by:
getArtifactsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getArtifactIds
- Specified by:
getArtifactIdsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getArtifact
- Specified by:
getArtifactin interfacede.iip_ecosphere.platform.services.ServiceManager
-
cloneArtifact
- Specified by:
cloneArtifactin interfacede.iip_ecosphere.platform.services.ServiceManager- Throws:
ExecutionException
-
getServiceInstanceCount
- Specified by:
getServiceInstanceCountin interfacede.iip_ecosphere.platform.services.ServiceOperations
-