package click.kamil.examples.jmsabstract;

import org.springframework.statemachine.StateMachine;
import org.springframework.stereotype.Component;

@Component
public class OrderAA extends AbstractAA {

    private final StateMachine<OrderStates, OrderEvents> stateMachine;

    public OrderAA(StateMachine<OrderStates, OrderEvents> stateMachine) {
        this.stateMachine = stateMachine;
    }

    @Override
    protected void doPMessage(String message) {
        stateMachine.sendEvent(OrderEvents.PAY);
    }
}
