コード例 #1
0
 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);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 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;
     }
 }
コード例 #5
0
 protected MessageHandlerBase(ILog log, string exchangeName)
 {
     ExchangeName = exchangeName;
     Log          = log.CreateComponentScope(GetType().Name);
 }
コード例 #6
0
 public AzureFixMessagesRepository(INoSQLTableStorage <FixMessageTableEntity> tableStorage, ILog log)
 {
     _tableStorage = tableStorage;
     _log          = log.CreateComponentScope(nameof(AzureFixMessagesRepository));
 }