Search in sources :

Example 1 with BoltStateMachineState

use of org.neo4j.bolt.runtime.statemachine.BoltStateMachineState in project neo4j by neo4j.

the class AbstractBoltStateMachine method nextState.

private void nextState(RequestMessage message, StateMachineContext context) throws BoltConnectionFatality {
    BoltStateMachineState preState = state;
    state = state.process(message, context);
    if (state == null) {
        String msg = "Message '" + message + "' cannot be handled by a session in the " + preState.name() + " state.";
        fail(Neo4jError.fatalFrom(Status.Request.Invalid, msg));
        throw new BoltProtocolBreachFatality(msg);
    }
}
Also used : BoltStateMachineState(org.neo4j.bolt.runtime.statemachine.BoltStateMachineState) BoltProtocolBreachFatality(org.neo4j.bolt.runtime.BoltProtocolBreachFatality)

Aggregations

BoltProtocolBreachFatality (org.neo4j.bolt.runtime.BoltProtocolBreachFatality)1 BoltStateMachineState (org.neo4j.bolt.runtime.statemachine.BoltStateMachineState)1