public class ShareScenarioRegistry extends Object
event processors
that allow for simple
registration
RandomWeightedEventSelector for details on weighting implementation.
Constructor and Description |
---|
ShareScenarioRegistry() |
Modifier and Type | Method and Description |
---|---|
String |
chooseRandomScenario()
Choose a random scenario based on the weightings provided on registration
|
ShareScenario |
getScenario(String scenarioName)
Get the processor that must handle events with the given name
|
void |
register(String scenarioName,
ShareScenario scenario,
double weight)
Register a share scenario by name and with the given weighting
|
public void register(String scenarioName, ShareScenario scenario, double weight)
scenarioName
- the name of the scenarioscenario
- the scenario implementationpublic ShareScenario getScenario(String scenarioName)
scenarioName
- the name of the event scenariopublic String chooseRandomScenario()
Copyright © 2015. All rights reserved.