Search in sources :

Example 1 with ActivitiesAware

use of io.engineblock.activityapi.core.ActivitiesAware in project engineblock by engineblock.

the class CoreInputDispenser method createInput.

private synchronized Input createInput(long slot) {
    SimpleConfig conf = new SimpleConfig(activity, "input");
    String inputType = conf.getString("type").orElse("targetrate");
    InputType inputTypeImpl = InputType.FINDER.getOrThrow(inputType);
    InputDispenser inputDispenser = inputTypeImpl.getInputDispenser(activity);
    if (inputDispenser instanceof ActivitiesAware) {
        ((ActivitiesAware) inputDispenser).setActivitiesMap(activities);
    }
    Input input = inputDispenser.getInput(slot);
    return input;
}
Also used : SimpleConfig(io.engineblock.util.SimpleConfig) Input(io.engineblock.activityapi.input.Input) InputType(io.engineblock.activityapi.input.InputType) InputDispenser(io.engineblock.activityapi.input.InputDispenser) ActivitiesAware(io.engineblock.activityapi.core.ActivitiesAware)

Aggregations

ActivitiesAware (io.engineblock.activityapi.core.ActivitiesAware)1 Input (io.engineblock.activityapi.input.Input)1 InputDispenser (io.engineblock.activityapi.input.InputDispenser)1 InputType (io.engineblock.activityapi.input.InputType)1 SimpleConfig (io.engineblock.util.SimpleConfig)1