public JfdExchange(JfdExchangeConfiguration config, TranslatedSignalsRepository translatedSignalsRepository, JfdOrderBooksHarvester harvester, IHandler <ExecutionReport> executionHandler, ILog log) : base(Name, config, translatedSignalsRepository, log) { _connector = new JfdTradeSessionConnector(new FixConnectorConfiguration(config.Password, config.GetTradingFixConfigAsReader()), log); _harvester = harvester; _executionHandler = executionHandler; _modelConverter = new JfdModelConverter(config); _log = log.CreateComponentScope(nameof(JfdExchange)); harvester.MaxOrderBookRate = config.MaxOrderBookRate; }
protected FixTradeSessionConnector(FixConnectorConfiguration config, ILog log) { _config = config; Log = log.CreateComponentScope(GetType().Name); var settings = new SessionSettings(config.FixConfig); var storeFactory = new FileStoreFactory(settings); var logFactory = new LykkeLogFactory(Log, false, false); _socketInitiator = new SocketInitiator(this, storeFactory, settings, logFactory); }
public JfdQuotesSessionConnector(FixConnectorConfiguration config, ILog log) { _config = config; _log = log.CreateComponentScope(GetType().Name); var settings = new SessionSettings(config.FixConfig); var storeFactory = new FileStoreFactory(settings); var logFactory = new LykkeLogFactory(_log, false, false); _socketInitiator = new SocketInitiator(this, storeFactory, settings, logFactory); RechargeQuotesTcs(); }
protected RequestStateMachine(QuickFix.Message message, CancellationToken cancellationToken, IMessageHandler messageHandler, ILog log) { Message = message; _messageHandler = messageHandler; CancellationToken = cancellationToken; Id = message.GetType().Name + Guid.NewGuid(); Log = Log = log.CreateComponentScope(GetType().Name); cancellationToken.Register(() => TaskCompletionSource.TrySetCanceled(cancellationToken)); if (cancellationToken.IsCancellationRequested) { TaskCompletionSource.TrySetCanceled(cancellationToken); Status = RequestStatus.Completed; } }
protected MessageHandlerBase(ILog log, string exchangeName) { ExchangeName = exchangeName; Log = log.CreateComponentScope(GetType().Name); }
public AzureFixMessagesRepository(INoSQLTableStorage <FixMessageTableEntity> tableStorage, ILog log) { _tableStorage = tableStorage; _log = log.CreateComponentScope(nameof(AzureFixMessagesRepository)); }