Пример #1
0
        public void Stop()
        {
            IsBlockingApplicationMessages = true;

            try
            {
                ima.Stop();
            }
            catch (Exception exc)
            {
                log.Error(ErrorCode.Runtime_Error_100108, "Stop failed.", exc);
            }

            StopAcceptingClientMessages();

            try
            {
                OutboundQueue.Stop();
            }
            catch (Exception exc)
            {
                log.Error(ErrorCode.Runtime_Error_100110, "Stop failed.", exc);
            }

            try
            {
                SocketManager.Stop();
            }
            catch (Exception exc)
            {
                log.Error(ErrorCode.Runtime_Error_100111, "Stop failed.", exc);
            }
        }
Пример #2
0
        public void Dispose()
        {
            if (ima != null)
            {
                ima.Dispose();
                ima = null;
            }

            OutboundQueue.Dispose();

            GC.SuppressFinalize(this);
        }
Пример #3
0
 public void SendMessage(Message msg)
 {
     // Note that if we identify or add other grains that are required for proper stopping, we will need to treat them as we do the membership table grain here.
     if (IsBlockingApplicationMessages && (msg.Category == Message.Categories.Application) && (msg.Result != Message.ResponseTypes.Rejection)
         && !Constants.SystemMembershipTableId.Equals(msg.TargetGrain))
     {
         // Drop the message on the floor if it's an application message that isn't a rejection
     }
     else
     {
         if (msg.SendingSilo == null)
             msg.SendingSilo = MyAddress;
         OutboundQueue.SendMessage(msg);
     }
 }
Пример #4
0
        public void Stop()
        {
            IsBlockingApplicationMessages = true;

            StopAcceptingClientMessages();

            try
            {
                WaitToRerouteAllQueuedMessages();
                OutboundQueue.Stop();
            }
            catch (Exception exc)
            {
                log.Error(ErrorCode.Runtime_Error_100110, "Stop failed.", exc);
            }
        }
Пример #5
0
 public void Start()
 {
     IsBlockingApplicationMessages = false;
     ima.Start();
     OutboundQueue.Start();
 }
Пример #6
0
 public void Send(Envelope envelope)
 {
     OutboundQueue.Enqueue(envelope);
 }
Пример #7
0
 public void Send(Envelope envelope)
 {
     OutboundQueue.Enqueue(envelope);
     OnSendMessage?.Invoke(envelope);
 }