public SessionFactory(IApplication app, IMessageStoreFactory storeFactory, ILogFactory logFactory, IMessageFactory messageFactory) { application_ = app; messageStoreFactory_ = storeFactory; logFactory_ = logFactory; messageFactory_ = messageFactory ?? new DefaultMessageFactory(); }
public SessionFactory(IApplication app, IMessageStoreFactory storeFactory, ILogFactory logFactory, IMessageFactory messageFactory) { application_ = app; messageStoreFactory_ = storeFactory; logFactory_ = logFactory; messageFactory_ = messageFactory ?? new DefaultMessageFactory(); }
public AbstractInitiator(IApplication app, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) { settings_ = settings; HashSet <SessionID> definedSessions = settings.GetSessions(); if (0 == definedSessions.Count) { throw new ConfigError("No sessions defined"); } SessionFactory factory = new SessionFactory(app, storeFactory, logFactory, messageFactory); foreach (SessionID sessionID in definedSessions) { Dictionary dict = settings.Get(sessionID); if ("initiator".Equals(dict.GetString(SessionSettings.CONNECTION_TYPE))) { sessionIDs_.Add(sessionID); sessions_[sessionID] = factory.Create(sessionID, dict); SetDisconnected(sessionID); } } if (0 == sessions_.Count) { throw new ConfigError("No sessions defined for initiator"); } }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) : base(application, storeFactory, settings, logFactory, messageFactory) { app_ = application; storeFactory_ = storeFactory; settings_ = settings; logFactory_ = logFactory; }
public QFNApp(SessionSettings ss) { settings = ss; //QFNApp storeFactory = new FileStoreFactory(settings); logFactory = new FileLogFactory(settings); initiator = new QuickFix.Transport.SocketInitiator(this, storeFactory, settings, logFactory); }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) : base(application, storeFactory, settings, logFactory, messageFactory) { app_ = application; storeFactory_ = storeFactory; settings_ = settings; logFactory_ = logFactory; }
protected virtual void Init() { this.application = new QuickFIX43Application(); this.sessionSettings = new SessionSettings("session.settings"); this.storeFactory = new FileStoreFactory(this.sessionSettings); this.logFactory = new FileLogFactory(this.sessionSettings); this.messageFactory = new DefaultMessageFactory(); }
public SmtpServerBackgroundService(ILogger <SmtpServerBackgroundService> logger, IConfiguration configuration, IMessageStoreFactory messageStoreFactory, ISmtpServerFactory smtpServerFactory, IRestClient restClient) { _logger = logger; _configuration = configuration; _messageStoreFactory = messageStoreFactory; _smtpServerFactory = smtpServerFactory; _restClient = restClient; }
protected virtual void Init() { this.application = new QuickFIX42Application(); this.sessionSettings = new SessionSettings(BeAEwTZGlZaeOmY5cm.J00weU3cM6(1776)); this.storeFactory = (MessageStoreFactory) new FileStoreFactory(this.sessionSettings); this.logFactory = (LogFactory) new FileLogFactory(this.sessionSettings); this.messageFactory = (MessageFactory) new DefaultMessageFactory(); }
public Session( IApplication app, IMessageStoreFactory storeFactory, SessionID sessID, DataDictionaryProvider dataDictProvider, SessionSchedule sessionSchedule, int heartBtInt, ILogFactory logFactory, IMessageFactory msgFactory, string senderDefaultApplVerID) { this.Application = app; this.SessionID = sessID; this.DataDictionaryProvider = new DataDictionaryProvider(dataDictProvider); this.schedule_ = sessionSchedule; this.msgFactory_ = msgFactory; this.SenderDefaultApplVerID = senderDefaultApplVerID; this.SessionDataDictionary = this.DataDictionaryProvider.GetSessionDataDictionary(this.SessionID.BeginString); if (this.SessionID.IsFIXT) this.ApplicationDataDictionary = this.DataDictionaryProvider.GetApplicationDataDictionary(this.SenderDefaultApplVerID); else this.ApplicationDataDictionary = this.SessionDataDictionary; ILog log; if (null != logFactory) log = logFactory.Create(sessID); else log = new NullLog(); state_ = new SessionState(log, heartBtInt) { MessageStore = storeFactory.Create(sessID) }; // Configuration defaults. // Will be overridden by the SessionFactory with values in the user's configuration. this.PersistMessages = true; this.ResetOnDisconnect = false; this.SendRedundantResendRequests = false; this.ValidateLengthAndChecksum = true; this.CheckCompID = true; this.MillisecondsInTimeStamp = true; this.EnableLastMsgSeqNumProcessed = false; this.MaxMessagesInResendRequest = 0; this.SendLogoutBeforeTimeoutDisconnect = false; this.IgnorePossDupResendRequests = false; this.RequiresOrigSendingTime = true; this.CheckLatency = true; this.MaxLatency = 120; if (!IsSessionTime) Reset("Out of SessionTime (Session construction)"); else if (IsNewSession) Reset("New session"); lock (sessions_) { sessions_[this.SessionID] = this; } this.Application.OnCreate(this.SessionID); this.Log.OnEvent("Created session"); }
/// <summary> /// Constructor. /// </summary> /// <param name="messageStoreFactory">The message store factory.</param> public DataCommand(IMessageStoreFactory messageStoreFactory) { if (messageStoreFactory == null) { throw new ArgumentNullException(nameof(messageStoreFactory)); } _messageStoreFactory = messageStoreFactory; }
/// <summary> /// Constructor. /// </summary> /// <param name="messageStoreFactory">The message store factory.</param> public DataCommand(IMessageStoreFactory messageStoreFactory) { if (messageStoreFactory == null) { throw new ArgumentNullException(nameof(messageStoreFactory)); } _messageStoreFactory = messageStoreFactory; }
public TCT_Fix() { settings = new SessionSettings(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "fix", "initiator.cfg")); storeFactory = new FileStoreFactory(settings); logFactory = new FileLogFactory(settings); initiator = new SocketInitiator( this, storeFactory, settings, logFactory); }
public SessionFactory(IApplication app, IMessageStoreFactory storeFactory, ILogFactory logFactory, IMessageFactory messageFactory) { // TODO: for V2, consider ONLY instantiating MessageFactory in the Create() method, // and removing instance var messageFactory_ altogether. // This makes sense because we can't distinguish FIX50 versions here in this constructor, // and thus can't create the right FIX-Version factory because we don't know what // session to use to look up the BeginString and DefaultApplVerID. application_ = app; messageStoreFactory_ = storeFactory; logFactory_ = logFactory ?? new NullLogFactory(); messageFactory_ = messageFactory ?? new DefaultMessageFactory(); }
public AbstractInitiator( IApplication app, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) { _app = app; _storeFactory = storeFactory; _settings = settings; _logFactory = logFactory; _msgFactory = messageFactory; HashSet<SessionID> definedSessions = _settings.GetSessions(); if (0 == definedSessions.Count) throw new ConfigError("No sessions defined"); }
public AbstractInitiator( IApplication app, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) { _app = app; _storeFactory = storeFactory; _settings = settings; _logFactory = logFactory ?? new NullLogFactory(); _msgFactory = messageFactory ?? new DefaultMessageFactory(); HashSet <SessionID> definedSessions = _settings.GetSessions(); if (0 == definedSessions.Count) { throw new ConfigError("No sessions defined"); } }
/// <summary> /// Create a ThreadedSocketAcceptor /// </summary> /// <param name="application"></param> /// <param name="storeFactory"></param> /// <param name="settings"></param> /// <param name="logFactory">If null, a NullFactory will be used.</param> /// <param name="messageFactory">If null, a DefaultMessageFactory will be created (using settings parameters)</param> public ThreadedSocketAcceptor( IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) { logFactory = logFactory ?? new NullLogFactory(); messageFactory = messageFactory ?? new DefaultMessageFactory(); SessionFactory sf = new SessionFactory(application, storeFactory, logFactory, messageFactory); try { CreateSessions(settings, sf); } catch (System.Exception e) { throw new ConfigError(e.Message, e); } }
public void StopIt() { if (sessionID == null) { return; } try { Session.LookupSession(sessionID).Disconnect("Stopping"); settings.Remove(sessionID); settings = null; initiator.Dispose(); settings = new SessionSettings(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "fix", "initiator.cfg")); storeFactory = new FileStoreFactory(settings); logFactory = new FileLogFactory(settings); initiator = new SocketInitiator( this, storeFactory, settings, logFactory); } catch { } }
public AbstractInitiator(IApplication app, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) { settings_ = settings; HashSet<SessionID> definedSessions = settings.GetSessions(); if (0 == definedSessions.Count) throw new ConfigError("No sessions defined"); SessionFactory factory = new SessionFactory(app, storeFactory, logFactory, messageFactory); foreach (SessionID sessionID in definedSessions) { Dictionary dict = settings.Get(sessionID); if ("initiator".Equals(dict.GetString(SessionSettings.CONNECTION_TYPE))) { sessionIDs_.Add(sessionID); sessions_[sessionID] = factory.Create(sessionID, dict); SetDisconnected(sessionID); } } if (0 == sessions_.Count) throw new ConfigError("No sessions defined for initiator"); }
public Form1() { InitializeComponent(); tbDisplay.ReadOnly = true; tbDisplay.ScrollBars = ScrollBars.Vertical; try { settings = new SessionSettings(configFile); storeFactory = new FileStoreFactory(settings); logFactory = new ScreenLogFactory(settings); initiator = new QuickFix.Transport.SocketInitiator(application, storeFactory, settings, logFactory); timer1.Interval = 1000; timer2.Interval = 500; timer3.Interval = 1000; timer4.Interval = 500; PricePlot.ChartAreas[0].AxisX.Minimum = 0; cBuyingSelling.ChartAreas[0].AxisX.Minimum = 0; cBuyingSelling.ChartAreas[1].AxisX.Minimum = 0; PricePlot.ChartAreas[1].AxisX.Minimum = 0; PricePlot.ChartAreas[2].AxisX.Minimum = 0; PricePlot.ChartAreas[0].AxisY.Title = "Price"; PricePlot.ChartAreas[1].AxisY.Title = "Price On Average"; PricePlot.ChartAreas[1].AxisY.Title = "Price after removing Trend"; PricePlot.ChartAreas[1].Visible = false; PricePlot.ChartAreas[2].Visible = false; ltime.ForeColor = System.Drawing.Color.Blue; runningTIme.ForeColor = System.Drawing.Color.Blue; runningTIme.Text = "Running Time: 0 Second"; String currentTime = DateTime.Now.ToString("h:mm:ss tt"); ltime.Text = "Current Time: " + currentTime; } catch (Exception e) { logger.Error(e.Message); logger.Error(e.StackTrace); } }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings) : this(application, storeFactory, settings, null) { }
public AbstractInitiator(IApplication app, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory) : this(app, storeFactory, settings, logFactory, null) { }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, Stream dictionaryStream = null) : this(application, storeFactory, settings, null, dictionaryStream) { }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory, Stream dictionaryStream = null) : base(application, storeFactory, settings, logFactory, messageFactory, dictionaryStream) { }
/// <summary> /// Adds a message store factory. /// </summary> /// <param name="value">The message store factory to use.</param> /// <returns>A OptionsBuilder to continue building on.</returns> public SmtpServerOptionsBuilder MessageStore(IMessageStoreFactory value) { _setters.Add(options => options.MessageStoreFactory = value ?? DoNothingMessageStore.Instance); return(this); }
public ThreadedSocketAcceptor(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) : this(new SessionFactory(application, storeFactory, logFactory, messageFactory), settings) { }
/// <summary> /// Add an instance of the Message Store Factory. /// </summary> /// <param name="messageStoreFactory">The message store factory.</param> public void Add(IMessageStoreFactory messageStoreFactory) { _messageStoreFactory = messageStoreFactory; }
/// <summary> /// Add an instance of the Message Store. /// </summary> /// <param name="messageStore">The message store.</param> public void Add(IMessageStore messageStore) { _messageStoreFactory = new DelegatingMessageStoreFactory(context => messageStore); }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) : this(new SessionFactory(application, storeFactory, logFactory, messageFactory), settings) { }
public AbstractInitiator(IApplication app, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, Stream dictionaryStream = null) : this(app, storeFactory, settings, logFactory, null, dictionaryStream) { }
public ThreadedSocketAcceptor(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory, IMessageFactory messageFactory) : this(new SessionFactory(application, storeFactory, logFactory, messageFactory), settings) { }
protected virtual void Init() { this.application = new QuickFIX42Application(); this.sessionSettings = new SessionSettings(BeAEwTZGlZaeOmY5cm.J00weU3cM6(1776)); this.storeFactory = (MessageStoreFactory)new FileStoreFactory(this.sessionSettings); this.logFactory = (LogFactory)new FileLogFactory(this.sessionSettings); this.messageFactory = (MessageFactory)new DefaultMessageFactory(); }
/// <summary> /// Create a ThreadedSocketAcceptor with a DefaultMessageFactory /// </summary> /// <param name="application"></param> /// <param name="storeFactory"></param> /// <param name="settings"></param> /// <param name="logFactory"></param> public ThreadedSocketAcceptor(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory) : this(application, storeFactory, settings, logFactory, null) { }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory) : base(application, storeFactory, settings, logFactory) { }
public AbstractInitiator(IApplication app, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory) : this(app, storeFactory, settings, logFactory, null) { }
protected virtual void Init() { this.application = new QuickFIX43Application(); this.sessionSettings = new SessionSettings("session.settings"); this.storeFactory = new FileStoreFactory(this.sessionSettings); this.logFactory = new FileLogFactory(this.sessionSettings); this.messageFactory = new DefaultMessageFactory(); }
public SessionFactory(IApplication app, IMessageStoreFactory storeFactory, ILogFactory logFactory) : this(app, storeFactory, logFactory, null) { }
/// <summary> /// Adds a message store factory. /// </summary> /// <param name="messageStoreFactory">The message store factory to use.</param> /// <returns>A OptionsBuilder to continue building on.</returns> public OptionsBuilder MessageStore(IMessageStoreFactory messageStoreFactory) { _options.MessageStoreFactory = messageStoreFactory; return this; }
/// <summary> /// Adds a message store factory. /// </summary> /// <param name="messageStoreFactory">The message store factory to use.</param> /// <returns>A OptionsBuilder to continue building on.</returns> public OptionsBuilder MessageStore(IMessageStoreFactory messageStoreFactory) { _options.MessageStoreFactory = messageStoreFactory; return(this); }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings) : this(application, storeFactory, settings, null) { }
public SessionFactory(IApplication app, IMessageStoreFactory storeFactory, ILogFactory logFactory) : this(app, storeFactory, logFactory, null) { }
public SocketInitiator(IApplication application, IMessageStoreFactory storeFactory, SessionSettings settings, ILogFactory logFactory) : base(application, storeFactory, settings, logFactory) { }