user3333720
user3333720

Reputation: 11

Spring State Machine change DefaultStateContext to custom implementation

I write a simple custom implementation of

public class AdditionalMethodContext<S,E> extends DefaultStateContext<S,E> implements StateContext<S,E>{
      
    
    public AdditionalMethodContext(Stage stage, Message<E> message, MessageHeaders messageHeaders, ExtendedState extendedState,
            Transition<S, E> transition, StateMachine<S, E> stateMachine, State<S, E> source, State<S, E> target, Exception exception) {
        super(stage,message,messageHeaders,extendedState,transition,stateMachine,source,target,exception);
    }


    public void printParam(String input) {
        System.out.println("input="+input);
        
    }

}

but I can't force my stateMachine factory to use it. How can i do it?

Upvotes: 1

Views: 114

Answers (0)

Related Questions