Interface ServiceDescriptor
- All Known Implementing Classes:
AbstractServiceDescriptor
public interface ServiceDescriptor
Describes a service. Intentionally, a service descriptor does not contain administrative operations form
Service as those operations shall be handled by the ServiceManager in consistent manner,
e.g., across services.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDenotes attachable actions. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidattachAction(ServiceDescriptor.Action action, Runnable run) Attaches a runnable to an action.Returns the additional arguments to be passed on during service start.Returns the application id this service is assigned to (withoutapplication instance id).default StringReturns the application instance id this service is running within.Returns the containing artifact.Returns all (asynchronous) connectors from this service.The description of the service.Returns the ensemble leader service, i.e., if multiple services are packaged together and shall be executed in the same process, it is important to synchronize aspects (via the ensemble leader service).getId()Returns the unique id of the service.Returns all (asynchronous) input connectors into this service.de.iip_ecosphere.platform.support.aas.InvocablesCreatorReturns the invocables creator of this services, e.g., to connect metrics access from an AAS via this creator.de.iip_ecosphere.platform.services.environment.ServiceKindgetKind()Returns the service kind.getName()The name of the service.Returns all (asynchronous) output connectors from this service.Returns all information about parameter forServiceOperations.reconfigureService(String, Map).default StringReturns the service id of the service, i.e.de.iip_ecosphere.platform.services.environment.ServiceStategetState()Returns the state the service is currently in.de.iip_ecosphere.platform.support.VersionThe version of the service.booleanReturns whether the service is deployable in distributable manner or fixed in deployment location.booleanReturns whether the service is top-level or nested, e.g., as family member.voidsetAdditionalArguments(List<String> args) Defines additional arguments to be passed on during service start.voidsetState(de.iip_ecosphere.platform.services.environment.ServiceState state) Changes the state.
-
Method Details
-
getId
String getId()Returns the unique id of the service.- Returns:
- the id (may contain the
application idand theapplication instance idif specified)
-
getApplicationId
String getApplicationId()Returns the application id this service is assigned to (withoutapplication instance id).- Returns:
- the application id
-
getServiceId
Returns the service id of the service, i.e.getId()withoutgetApplicationId()andgetApplicationInstanceId().- Returns:
- the id
-
getApplicationInstanceId
Returns the application instance id this service is running within. Usually, theapplication idshall be a prefix of this id.- Returns:
- the application instance id (may be empty for the default application instance)
-
getName
String getName()The name of the service.- Returns:
- the name
-
getVersion
de.iip_ecosphere.platform.support.Version getVersion()The version of the service.- Returns:
- the version
-
getDescription
String getDescription()The description of the service.- Returns:
- the description, may be empty
-
getState
de.iip_ecosphere.platform.services.environment.ServiceState getState()Returns the state the service is currently in. [R4c]- Returns:
- the state
-
getEnsembleLeader
ServiceDescriptor getEnsembleLeader()Returns the ensemble leader service, i.e., if multiple services are packaged together and shall be executed in the same process, it is important to synchronize aspects (via the ensemble leader service).- Returns:
- the ensemble leader, may be null if there is none
-
setState
void setState(de.iip_ecosphere.platform.services.environment.ServiceState state) throws ExecutionException Changes the state. [R133c]- Parameters:
state- the new state- Throws:
ExecutionException- if changing the state fails for some reason
-
isDeployable
boolean isDeployable()Returns whether the service is deployable in distributable manner or fixed in deployment location.- Returns:
truefor deployable,falsefor fixed
-
isTopLevel
boolean isTopLevel()Returns whether the service is top-level or nested, e.g., as family member.- Returns:
truefor top-level,falseelse
-
getKind
de.iip_ecosphere.platform.services.environment.ServiceKind getKind()Returns the service kind.- Returns:
- the service kind
-
getArtifact
ArtifactDescriptor getArtifact()Returns the containing artifact.- Returns:
- the containing artifact (descriptor)
-
getParameters
List<TypedDataDescriptor> getParameters()Returns all information about parameter forServiceOperations.reconfigureService(String, Map).- Returns:
- the name-descriptor mapping for all supported parameters
-
getInputDataConnectors
List<TypedDataConnectorDescriptor> getInputDataConnectors()Returns all (asynchronous) input connectors into this service.- Returns:
- all input channels, may contain other-sided connectors where
TypedDataConnectorDescriptor.getService()is notgetId()
-
getOutputDataConnectors
List<TypedDataConnectorDescriptor> getOutputDataConnectors()Returns all (asynchronous) output connectors from this service.- Returns:
- all input channels, may contain other-sided connectors where
TypedDataConnectorDescriptor.getService()is notgetId()
-
getDataConnectors
List<TypedDataConnectorDescriptor> getDataConnectors()Returns all (asynchronous) connectors from this service.- Returns:
- all channels, may contain other-sided connectors where
TypedDataConnectorDescriptor.getService()is notgetId() - See Also:
-
getInvocablesCreator
de.iip_ecosphere.platform.support.aas.InvocablesCreator getInvocablesCreator()Returns the invocables creator of this services, e.g., to connect metrics access from an AAS via this creator. Depending on the service manager, there may be prerequisites that this method returns a creator instance.- Returns:
- the creator, may return
InvocablesCreator.NULL_CREATORbut not null
-
setAdditionalArguments
Defines additional arguments to be passed on during service start.- Parameters:
args- the arguments, may be empty or null for none
-
getAdditionalArguments
Returns the additional arguments to be passed on during service start.- Returns:
- the arguments, may be empty or null for none
-
attachAction
Attaches a runnable to an action.- Parameters:
action- the actionrun- the runnable
-