コード例 #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
ファイル: MessageCenter.cs プロジェクト: thakursagar/orleans
 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
ファイル: TestUdpSocket.cs プロジェクト: fryarludwig/CPMSharp
 public void Send(Envelope envelope)
 {
     OutboundQueue.Enqueue(envelope);
 }
コード例 #7
0
 public void Send(Envelope envelope)
 {
     OutboundQueue.Enqueue(envelope);
     OnSendMessage?.Invoke(envelope);
 }