Interface ServiceBase
- All Known Subinterfaces:
GenericMultiTypeService,MonitoringService,Service,UpdatingMonitoringService
- All Known Implementing Classes:
AbstractDelegatingMultiService,AbstractDelegatingService,AbstractProcessService,AbstractPythonProcessService,AbstractRestProcessService,AbstractRunnablesService,AbstractService,AbstractStringProcessService,ConnectorServiceWrapper,DefaultServiceImpl,FamilyServiceStub,MockingConnectorServiceWrapper,MockingMultiConnectorServiceWrapper,MultiConnectorServiceWrapper,PythonAsyncProcessService,PythonSyncProcessService,PythonWsProcessService,ServiceStub,TraceToAasService
public interface ServiceBase
Just the very basics needed to do service switching.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringComposes an (internal) id from a service and an application id.static StringComposes an (internal) id from a service and an application id.static StringReturns the application id from an (internal) id.static StringReturns the application instance id from an (internal) id.getId()Returns the unique id of the service.static StringgetServiceId(String id) Returns the service id from an (internal) id.getState()Returns the state the service is currently in.voidsetState(ServiceState state) Changes the state.static StringvalidateApplicationInstanceId(String appInstanceId) Validates an application instance id.
-
Field Details
-
APPLICATION_SEPARATOR
- See Also:
-
DEFAULT_APPLICATION_INSTANCE_ID
- See Also:
-
-
Method Details
-
getId
String getId()Returns the unique id of the service. May be a single service id, a service id and a postfixed application id (afterAPPLICATION_SEPARATOR) or a service id with application id and postfixed application instance id (afterAPPLICATION_SEPARATOR)- Returns:
- the unique id
-
getState
ServiceState getState()Returns the state the service is currently in. [R4c]- Returns:
- the state
-
setState
Changes the state. [R133c]- Parameters:
state- the new state- Throws:
ExecutionException- if changing the state fails for some reason
-
getServiceId
Returns the service id from an (internal) id.- Parameters:
id- the id to split- Returns:
- the service id, may be
idif there is no application id - See Also:
-
getApplicationId
Returns the application id from an (internal) id.- Parameters:
id- the id to split- Returns:
- the application id, may be empty if there is none
- See Also:
-
getApplicationInstanceId
Returns the application instance id from an (internal) id.- Parameters:
id- the id to split- Returns:
- the application id, may be empty if there is none
- See Also:
-
validateApplicationInstanceId
Validates an application instance id.- Parameters:
appInstanceId- the id to validate- Returns:
- the validated id, if
appInstanceIdwould be null or empty,DEFAULT_APPLICATION_INSTANCE_IDis returned
-
composeId
Composes an (internal) id from a service and an application id.- Parameters:
serviceId- the service idapplicationId- the application id, may be null or empty for none,APPLICATION_SEPARATORinapplicationIdwill be removed- Returns:
- the composed id
-
composeId
Composes an (internal) id from a service and an application id.- Parameters:
serviceId- the service id,APPLICATION_SEPARATORinserviceIdwill be removedapplicationId- the application id, may be null or empty for none,APPLICATION_SEPARATORinapplicationIdwill be removedapplicationInstanceId- the application instance id, may be null or empty for none, used only ifapplicationIdis given,APPLICATION_SEPARATORinapplicationInstanceIdwill be removed- Returns:
- the composed id
-