Sxta.Rti1516.BoostrapProtocol.InteractionManager.ReceiveInteraction C# (CSharp) Method

ReceiveInteraction() public method

Notifies the federate of a received interaction.
public ReceiveInteraction ( BaseInteractionMessage msg ) : void
msg BaseInteractionMessage
return void
        public void ReceiveInteraction(BaseInteractionMessage msg)
        {
            if (log.IsDebugEnabled)
                log.Debug("Read msg: " + msg);

            try
            {
                if (interactionDelegates.ContainsKey(msg.GetType()))
                {
                    interactionDelegates[msg.GetType()](msg);
                }
                //else
                //{
                    lock (interactionListeners)
                    {
                        foreach (IInteractionListener il in interactionListeners)
                        {
                            (il as IInteractionListener).ReceiveInteraction(msg);
                        }
                    }
                //}
            }
            catch (IOException ioe)
            {
                throw new FederateInternalError(ioe.ToString());
            }
        }