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 java.lang.Object implements de.iip_ecosphere.platform.services.ServiceManagerA mocking service manager for a given service artifact. Only selected functions are implemented!- Author:
- Holger Eichelberger, SSE
-
-
Constructor Summary
Constructors Modifier Constructor Description privateMockServiceManager(de.iip_ecosphere.platform.services.spring.SpringCloudArtifactDescriptor aDesc)Creates a service manager instance for the given artifact descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateService(java.lang.String serviceId)java.lang.StringaddArtifact(java.net.URI location)voidcloneArtifact(java.lang.String artifactId, java.net.URI location)de.iip_ecosphere.platform.services.ArtifactDescriptorgetArtifact(java.lang.String artifactId)java.util.Set<java.lang.String>getArtifactIds()java.util.Collection<? extends de.iip_ecosphere.platform.services.ArtifactDescriptor>getArtifacts()java.util.List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor>getInputDataConnectors(java.lang.String serviceId)java.util.List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor>getOutputDataConnectors(java.lang.String serviceId)java.util.List<de.iip_ecosphere.platform.services.TypedDataDescriptor>getParameters(java.lang.String serviceId)de.iip_ecosphere.platform.services.ServiceDescriptorgetService(java.lang.String serviceId)java.util.Set<java.lang.String>getServiceIds()intgetServiceInstanceCount(java.lang.String serviceId)java.util.Collection<? extends de.iip_ecosphere.platform.services.ServiceDescriptor>getServices()de.iip_ecosphere.platform.services.environment.ServiceStategetServiceState(java.lang.String serviceId)voidmigrateService(java.lang.String serviceId, java.lang.String resourceId)voidpassivateService(java.lang.String serviceId)voidreconfigureService(java.lang.String serviceId, java.util.Map<java.lang.String,java.lang.String> values)voidremoveArtifact(java.lang.String artifactId)voidsetServiceState(java.lang.String serviceId, de.iip_ecosphere.platform.services.environment.ServiceState state)voidstartService(java.lang.String... serviceId)voidstartService(java.util.Map<java.lang.String,java.lang.String> options, java.lang.String... serviceId)voidstopService(java.lang.String... serviceId)voidswitchToService(java.lang.String serviceId, java.lang.String targetId)voidupdateService(java.lang.String serviceId, java.net.URI location)
-
-
-
Method Detail
-
updateService
public void updateService(java.lang.String serviceId, java.net.URI location) throws java.util.concurrent.ExecutionException- Specified by:
updateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
switchToService
public void switchToService(java.lang.String serviceId, java.lang.String targetId) throws java.util.concurrent.ExecutionException- Specified by:
switchToServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
stopService
public void stopService(java.lang.String... serviceId) throws java.util.concurrent.ExecutionException- Specified by:
stopServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
startService
public void startService(java.lang.String... serviceId) throws java.util.concurrent.ExecutionException- Specified by:
startServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
startService
public void startService(java.util.Map<java.lang.String,java.lang.String> options, java.lang.String... serviceId) throws java.util.concurrent.ExecutionException- Specified by:
startServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
setServiceState
public void setServiceState(java.lang.String serviceId, de.iip_ecosphere.platform.services.environment.ServiceState state) throws java.util.concurrent.ExecutionException- Specified by:
setServiceStatein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
removeArtifact
public void removeArtifact(java.lang.String artifactId) throws java.util.concurrent.ExecutionException- Specified by:
removeArtifactin interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
reconfigureService
public void reconfigureService(java.lang.String serviceId, java.util.Map<java.lang.String,java.lang.String> values) throws java.util.concurrent.ExecutionException- Specified by:
reconfigureServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
passivateService
public void passivateService(java.lang.String serviceId) throws java.util.concurrent.ExecutionException- Specified by:
passivateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
migrateService
public void migrateService(java.lang.String serviceId, java.lang.String resourceId) throws java.util.concurrent.ExecutionException- Specified by:
migrateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
getServiceState
public de.iip_ecosphere.platform.services.environment.ServiceState getServiceState(java.lang.String serviceId)
- Specified by:
getServiceStatein interfacede.iip_ecosphere.platform.services.ServiceOperations
-
addArtifact
public java.lang.String addArtifact(java.net.URI location) throws java.util.concurrent.ExecutionException- Specified by:
addArtifactin interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
activateService
public void activateService(java.lang.String serviceId) throws java.util.concurrent.ExecutionException- Specified by:
activateServicein interfacede.iip_ecosphere.platform.services.ServiceOperations- Throws:
java.util.concurrent.ExecutionException
-
getServices
public java.util.Collection<? extends de.iip_ecosphere.platform.services.ServiceDescriptor> getServices()
- Specified by:
getServicesin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getServiceIds
public java.util.Set<java.lang.String> getServiceIds()
- Specified by:
getServiceIdsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getService
public de.iip_ecosphere.platform.services.ServiceDescriptor getService(java.lang.String serviceId)
- Specified by:
getServicein interfacede.iip_ecosphere.platform.services.ServiceManager
-
getParameters
public java.util.List<de.iip_ecosphere.platform.services.TypedDataDescriptor> getParameters(java.lang.String serviceId)
- Specified by:
getParametersin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getOutputDataConnectors
public java.util.List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor> getOutputDataConnectors(java.lang.String serviceId)
- Specified by:
getOutputDataConnectorsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getInputDataConnectors
public java.util.List<de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor> getInputDataConnectors(java.lang.String serviceId)
- Specified by:
getInputDataConnectorsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getArtifacts
public java.util.Collection<? extends de.iip_ecosphere.platform.services.ArtifactDescriptor> getArtifacts()
- Specified by:
getArtifactsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getArtifactIds
public java.util.Set<java.lang.String> getArtifactIds()
- Specified by:
getArtifactIdsin interfacede.iip_ecosphere.platform.services.ServiceManager
-
getArtifact
public de.iip_ecosphere.platform.services.ArtifactDescriptor getArtifact(java.lang.String artifactId)
- Specified by:
getArtifactin interfacede.iip_ecosphere.platform.services.ServiceManager
-
cloneArtifact
public void cloneArtifact(java.lang.String artifactId, java.net.URI location) throws java.util.concurrent.ExecutionException- Specified by:
cloneArtifactin interfacede.iip_ecosphere.platform.services.ServiceManager- Throws:
java.util.concurrent.ExecutionException
-
getServiceInstanceCount
public int getServiceInstanceCount(java.lang.String serviceId)
- Specified by:
getServiceInstanceCountin interfacede.iip_ecosphere.platform.services.ServiceOperations
-
-