Class ApplicationInstanceAasConstructor
java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.ApplicationInstanceAasConstructor
A class to construct the AAS submodel for application instances. This class is intentionally not an AAS rather
than it provides the way to construct and modify it. The
ApplicationInstancesAasClient is related.- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static intcountAppInstances(String appId, String planId, de.iip_ecosphere.platform.support.aas.Submodel sub) Return the number of application instances with the givenappId.static booleanReturns whether the first application shall receive an app id.private static StringgetAasAppInstanceId(String appId, int instanceId) Returns the AAS application instance id.private static StringgetAasAppInstanceId(String appId, String instanceId) Returns the AAS application instance id.static intnotifyAppInstanceStopped(String appId, String instanceId) Called to notify that an app instance was stopped.static StringnotifyAppNewInstance(String appId, String planId) Called to notify that a new instance of the applicationappIdis about to be started.
-
Field Details
-
NAME_SUBMODEL_APPINSTANCES
- See Also:
-
NAME_PROP_APPID
- See Also:
-
NAME_PROP_PLANID
- See Also:
-
NAME_PROP_INSTANCEID
- See Also:
-
NAME_PROP_TIMESTAMP
- See Also:
-
-
Constructor Details
-
ApplicationInstanceAasConstructor
public ApplicationInstanceAasConstructor()
-
-
Method Details
-
firstAppWithoutAppId
public static boolean firstAppWithoutAppId()Returns whether the first application shall receive an app id.- Returns:
truefor no app id,falseelse (default)
-
notifyAppNewInstance
Called to notify that a new instance of the applicationappIdis about to be started.- Parameters:
appId- the application idplanId- the id of the deployment plan starting the plan- Returns:
- the id of the new instance to be passed on to the service starts, may be null for default/legacy start
-
getAasAppInstanceId
Returns the AAS application instance id.- Parameters:
appId- the application idinstanceId- the instance id- Returns:
- the application instance id ready to be used as id short in an AAS
-
getAasAppInstanceId
Returns the AAS application instance id.- Parameters:
appId- the application idinstanceId- the instance id- Returns:
- the application instance id ready to be used as id short in an AAS
-
notifyAppInstanceStopped
Called to notify that an app instance was stopped.- Parameters:
appId- the application id of the instance that was stoppedinstanceId- the instance id of the instance, may be null or empty for legacy application starts- Returns:
- the remaining instances (across all deployment plans)
-
countAppInstances
static int countAppInstances(String appId, String planId, de.iip_ecosphere.platform.support.aas.Submodel sub) Return the number of application instances with the givenappId.- Parameters:
appId- the application id to look forplanId- the deployment plan id to filter for, may be empty or null to not filter for deployment planssub- the submodel to take the data from- Returns:
- the number of instances
-