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 Details

  • 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 (after APPLICATION_SEPARATOR) or a service id with application id and postfixed application instance id (after APPLICATION_SEPARATOR)
      Returns:
      the unique id
    • getState

      ServiceState getState()
      Returns the state the service is currently in. [R4c]
      Returns:
      the state
    • setState

      void setState(ServiceState state) throws ExecutionException
      Changes the state. [R133c]
      Parameters:
      state - the new state
      Throws:
      ExecutionException - if changing the state fails for some reason
    • getServiceId

      static String getServiceId(String id)
      Returns the service id from an (internal) id.
      Parameters:
      id - the id to split
      Returns:
      the service id, may be id if there is no application id
      See Also:
    • getApplicationId

      static String getApplicationId(String id)
      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

      static String getApplicationInstanceId(String id)
      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

      static String validateApplicationInstanceId(String appInstanceId)
      Validates an application instance id.
      Parameters:
      appInstanceId - the id to validate
      Returns:
      the validated id, if appInstanceId would be null or empty, DEFAULT_APPLICATION_INSTANCE_ID is returned
    • composeId

      static String composeId(String serviceId, String applicationId)
      Composes an (internal) id from a service and an application id.
      Parameters:
      serviceId - the service id
      applicationId - the application id, may be null or empty for none, APPLICATION_SEPARATOR in applicationId will be removed
      Returns:
      the composed id
    • composeId

      static String composeId(String serviceId, String applicationId, String applicationInstanceId)
      Composes an (internal) id from a service and an application id.
      Parameters:
      serviceId - the service id, APPLICATION_SEPARATOR in serviceId will be removed
      applicationId - the application id, may be null or empty for none, APPLICATION_SEPARATOR in applicationId will be removed
      applicationInstanceId - the application instance id, may be null or empty for none, used only if applicationId is given, APPLICATION_SEPARATOR in applicationInstanceId will be removed
      Returns:
      the composed id