Enum Class ClassLoaderUsage
- All Implemented Interfaces:
Serializable,Comparable<ClassLoaderUsage>,java.lang.constant.Constable
What classloader to use for the execution of an activity. This may be an own
classloader for each execution, a shared classloader for different executions
of the same activity, a shared classloader for the correspondung runtime
manager and the classloader of the AristaFlow platform. The shared
classloader will be relative to a runtime manager on a specific JVM.
- Author:
- Ulrich Kreher
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEach activity instance will be loaded by its own classloader and is therefore a singleton.The classloader of the AristaFlow platform will be used.A classloader will be used for all instances of the very same activity executed on the same runtime manager independent from process instances and templates but separated between system and non-system component.A classloader will be used for all activities having the same executable component name (AbstractActivity.getExecutableComponentName()) and system component (AbstractActivity.getSystemComponent()).A classloader will be used for all activities having the same implementation class (AbstractActivity.getImplementationClass()) and system component (AbstractActivity.getSystemComponent()).The classloader for the runtime manager will be used and thus all classes will be shared among all activities. -
Method Summary
Modifier and TypeMethodDescriptionbytegetCode()Returns a byte code representing this classloader usage.static ClassLoaderUsagevalueOf(byte code) Returns the classloader usage for the designated code ornullif the code is not recognised.static ClassLoaderUsageReturns the enum constant of this class with the specified name.static ClassLoaderUsage[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLATFORM
The classloader of the AristaFlow platform will be used. -
SHARE_RUNTIME_MANAGER
The classloader for the runtime manager will be used and thus all classes will be shared among all activities. Note that the libraries of the activity have to be in the shared directory of the runtime manager. -
SHARE_ACTIVITY_INSTANCES
A classloader will be used for all instances of the very same activity executed on the same runtime manager independent from process instances and templates but separated between system and non-system component. Equality considers executable component name (AbstractActivity.getExecutableComponentName()), configuration name (AbstractActivity.getConfigurationName()), operation name (AbstractActivity.getOperationName()), activity name (AbstractActivity.getActivityName()) and system component (AbstractActivity.getSystemComponent()).
The runtime manager instantiates the executable component for every execution but the static fields will be shared. However, the classloader sharing will be based on a runtime manager and a JVM; singleton behaviour based on process instance, process template or other process model elements cannot be achieved directly. To achieve this special behaviour, the implementation of theExecutableComponentneeds to implement this by providing the information based on the data of theEBPInstanceReference. For instance it can multiplex on the process instance ID or other data from the process model. -
NON_SHARED
Each activity instance will be loaded by its own classloader and is therefore a singleton. -
SHARE_EXECUTABLE_COMPONENT
A classloader will be used for all activities having the same executable component name (AbstractActivity.getExecutableComponentName()) and system component (AbstractActivity.getSystemComponent()). SeeSHARE_ACTIVITY_INSTANCESfor details on how to control singleton behaviour. -
SHARE_IMPLEMENTATION_CLASS
A classloader will be used for all activities having the same implementation class (AbstractActivity.getImplementationClass()) and system component (AbstractActivity.getSystemComponent()). SeeSHARE_ACTIVITY_INSTANCESfor details on how to control singleton behaviour.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public byte getCode()Returns a byte code representing this classloader usage. This code is resilient to reordering or renaming the enum constants.- Returns:
- A byte code representing this classloader usage.
-
valueOf
Returns the classloader usage for the designated code ornullif the code is not recognised.- Parameters:
code- The code for which to find the classloader usage.- Returns:
- The classloader usage for the designated code.
-