class BoltStateMachineFactoryImpl implements BoltStateMachineFactory {

    @Override
    public BoltStateMachine newStateMachine( long protocolVersion, BoltChannel boltChannel )
    {
        if ( protocolVersion == BoltProtocolV1.VERSION || protocolVersion == BoltProtocolV2.VERSION )
        {
            return newStateMachineV1( boltChannel );
        }
        else if ( protocolVersion == BoltProtocolV3.VERSION )
        {
            return newStateMachineV3( boltChannel );
        }
        else
        {
            throw new IllegalArgumentException( "Failed to create a state machine for protocol version " + protocolVersion );
        }
    }

    public  BoltStateMachineFactoryImpl( DatabaseManager databaseManager, UsageData usageData,
            Authentication authentication, Clock clock, Config config, LogService logging );

}