public ConcurrentConsumerDispatcher(ModelBase model, ConsumerWorkService ws) { this.model = model; this.workService = ws; this.workService.RegisterKey(model); this.IsShutdown = false; }
public ConnectionBase(ConnectionFactory factory, bool insist, IFrameHandler frameHandler) { m_factory = factory; m_frameHandler = frameHandler; m_sessionManager = new SessionManager(this, 0); m_session0 = new MainSession(this); m_session0.Handler = new MainSession.SessionCloseDelegate(NotifyReceivedCloseOk); m_model0 = (ModelBase)Protocol.CreateModel(m_session0); StartMainLoop(); Open(insist); StartHeartbeatLoops(); AppDomain.CurrentDomain.DomainUnload += HandleDomainUnload; }
public Connection(IConnectionFactory factory, bool insist, IFrameHandler frameHandler, string clientProvidedName = null) { ClientProvidedName = clientProvidedName; KnownHosts = null; FrameMax = 0; m_factory = factory; m_frameHandler = frameHandler; ConsumerWorkService = new ConsumerWorkService(); m_sessionManager = new SessionManager(this, 0); m_session0 = new MainSession(this) { Handler = NotifyReceivedCloseOk }; m_model0 = (ModelBase)Protocol.CreateModel(m_session0); StartMainLoop(factory.UseBackgroundThreadsForIO); Open(insist); }
public Connection(IConnectionFactory factory, bool insist, IFrameHandler frameHandler) { KnownHosts = null; FrameMax = 0; m_factory = factory; m_frameHandler = frameHandler; this.ConsumerWorkService = new ConsumerWorkService(factory.TaskScheduler); m_sessionManager = new SessionManager(this, 0); m_session0 = new MainSession(this) { Handler = NotifyReceivedCloseOk }; m_model0 = (ModelBase)Protocol.CreateModel(m_session0); StartMainLoop(factory.UseBackgroundThreadsForIO); Open(insist); #if NETFX_CORE #pragma warning disable 0168 try { Windows.UI.Xaml.Application.Current.Suspending += this.HandleApplicationSuspend; } catch (Exception ex) { // If called from a desktop app (i.e. unit tests), then there is no current application } #pragma warning restore 0168 #else AppDomain.CurrentDomain.DomainUnload += HandleDomainUnload; #endif }
internal BasicPublishBatch(ModelBase model) { this.model = model; }
internal BasicPublishBatch(ModelBase model, int sizeHint) { _model = model; _commands = new List <OutgoingCommand>(sizeHint); }
public AsyncConsumerDispatcher(ModelBase model, AsyncConsumerWorkService ws) { _model = model; _workService = ws; IsShutdown = false; }
public ConcurrentConsumerDispatcher(ModelBase model, ConsumerWorkService ws) { this.model = model; workService = ws; IsShutdown = false; }
internal BasicPublishBatch(ModelBase model) { _model = model; _commands = new List <OutgoingCommand>(); }
protected abstract Task Execute(ModelBase model, IAsyncBasicConsumer consumer);
public void Schedule <TWork>(ModelBase model, TWork work) where TWork : Work { _workPools.GetOrAdd(model, StartNewWorkPool).Enqueue(work); }
public ConnectionBase(ConnectionParameters parameters, bool insist, IFrameHandler frameHandler) { m_parameters = parameters; m_frameHandler = frameHandler; m_sessionManager = new SessionManager(this); m_session0 = new MainSession(this); m_session0.Handler = new MainSession.SessionCloseDelegate(NotifyReceivedCloseOk); m_model0 = (ModelBase)Protocol.CreateModel(m_session0); StartMainLoop(); Open(insist); StartHeartbeatLoops(); }
public Task Execute(ModelBase model) { return(Execute(model, _asyncConsumer)); }
public BasicPublishBatch(ModelBase model) { _model = model; }