use of com.sequenceiq.cloudbreak.core.flow2.FlowAdapter in project cloudbreak by hortonworks.
the class AbstractFlowConfiguration method createFlow.
@Override
public Flow createFlow(String flowId, Long stackId) {
StateMachine<S, E> sm = stateMachineFactory.getStateMachine();
FlowStructuredEventHandler<S, E> fl = applicationContext.getBean(FlowStructuredEventHandler.class, getEdgeConfig().initState, getEdgeConfig().finalState, getClass().getSimpleName(), flowId, stackId);
Flow flow = new FlowAdapter<>(flowId, sm, new MessageFactory<>(), new StateConverterAdapter<>(stateType), new EventConverterAdapter<>(eventType), (Class<? extends FlowConfiguration<E>>) getClass(), fl);
sm.addStateListener(fl);
return flow;
}
Aggregations