Class StrategiesRegistry
- java.lang.Object
-
- org.palladiosimulator.protocom.framework.java.ee.prototype.StrategiesRegistry
-
public final class StrategiesRegistry extends Object
The StrategiesRegistry class is used to store initialized strategies for lookup during the prototype's execution.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StrategiesRegistry
getInstance()
Gets the instance of the strategies registry.IDemandStrategy
getStrategy(ResourceTypeEnum resourceType)
Gets a registered strategy of the specified type.void
registerStrategy(ResourceTypeEnum resourceType, IDemandStrategy strategy)
Registers a strategy.
-
-
-
Method Detail
-
getInstance
public static StrategiesRegistry getInstance()
Gets the instance of the strategies registry.- Returns:
- the instance of the strategies registry
-
registerStrategy
public void registerStrategy(ResourceTypeEnum resourceType, IDemandStrategy strategy)
Registers a strategy.- Parameters:
resourceType
- the type of the strategystrategy
- the strategy to register
-
getStrategy
public IDemandStrategy getStrategy(ResourceTypeEnum resourceType)
Gets a registered strategy of the specified type.- Parameters:
resourceType
- the type of strategy to retrieve- Returns:
- a registered strategy of the specified type
-
-