Class CoreMotorDispenser<D>
- java.lang.Object
-
- io.engineblock.activityimpl.motor.CoreMotorDispenser<D>
-
- All Implemented Interfaces:
MotorDispenser<D>
public class CoreMotorDispenser<D> extends java.lang.Object implements MotorDispenser<D>
Produce index ActivityMotor instances with an input and action, given the input and an action factory.
-
-
Constructor Summary
Constructors Constructor Description CoreMotorDispenser(Activity activity, InputDispenser inputDispenser, ActionDispenser actionDispenser, OutputDispenser outputDispenser)
-
Method Summary
Modifier and Type Method Description Motor<D>getMotor(ActivityDef activityDef, int slotId)Resolve (find or create) a Motor instance for the slot specified.
-
-
-
Constructor Detail
-
CoreMotorDispenser
public CoreMotorDispenser(Activity activity, InputDispenser inputDispenser, ActionDispenser actionDispenser, OutputDispenser outputDispenser)
-
-
Method Detail
-
getMotor
public Motor<D> getMotor(ActivityDef activityDef, int slotId)
Description copied from interface:MotorDispenserResolve (find or create) a Motor instance for the slot specified. The motor is not required to be per-slot (per-thread), but any shared inputs motors be thread safe.- Specified by:
getMotorin interfaceMotorDispenser<D>- Parameters:
activityDef- the ActivityDef which will be used to parameterize the returned motorslotId- The numbered slot within the activity instance for this motor- Returns:
- A new or cached Motor for the specified slot.
-
-