Beispiel #1
0
        /// <summary>
        /// Read data from the reliable channel
        /// </summary>
        public void ReliableRead(StreamMessageChannel messageChannel)
        {
            /*
             * if (log.IsInfoEnabled)
             *  log.Info("On " + System.Reflection.MethodBase.GetCurrentMethod());
             */

            try
            {
                lock (messageChannel.SyncObject)
                {
                    object tmp = BaseInteractionMessage.NullBaseInteractionMessage;
                    object msg = serializer.Deserialize(messageChannel.InputStream, ref tmp);
                    if (msg is BaseInteractionMessage)
                    {
                        ReceiveInteraction(msg as BaseInteractionMessage);
                    }
                }
            }
            catch (System.Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error(" Exception on ReliableRead: " + e.Message);
                }
                //throw new RTIinternalError(e.Message);
            }
        }
Beispiel #2
0
 public virtual void SendRealiableInteraction(StreamMessageChannel messageChannel, BaseInteractionMessage msg)
 {
     try
     {
         lock (messageChannel.SyncObject)
         {
             /*
              * if (log.IsDebugEnabled)
              *  log.Debug("Sending Interaction: " + msg);
              */
             serializer.Serialize(messageChannel.OutputStream, msg);
         }
     }
     catch (System.Exception e)
     {
         throw new RTIinternalError(e.Message);
     }
 }
Beispiel #3
0
 public virtual void SendRealiableInteraction(StreamMessageChannel messageChannel, BaseInteractionMessage msg)
 {
     try
     {
         lock (messageChannel.SyncObject)
         {
             /*
             if (log.IsDebugEnabled)
                 log.Debug("Sending Interaction: " + msg);
             */
             serializer.Serialize(messageChannel.OutputStream, msg);
         }
     }
     catch (System.Exception e)
     {
         throw new RTIinternalError(e.Message);
     }
 }
Beispiel #4
0
        /// <summary>
        /// Read data from the reliable channel
        /// </summary>
        public void ReliableRead(StreamMessageChannel messageChannel)
        {
            /*
            if (log.IsInfoEnabled)
                log.Info("On " + System.Reflection.MethodBase.GetCurrentMethod());
            */

            try
            {
                lock (messageChannel.SyncObject)
                {
                    object tmp = BaseInteractionMessage.NullBaseInteractionMessage;
                    object msg = serializer.Deserialize(messageChannel.InputStream, ref tmp);
                    if (msg is BaseInteractionMessage)
                    {
                        ReceiveInteraction(msg as BaseInteractionMessage);
                    }
                }
            }
            catch (System.Exception e)
            {
                if (log.IsErrorEnabled)
                    log.Error(" Exception on ReliableRead: " + e.Message);
                //throw new RTIinternalError(e.Message);
            }
        }