private void NotifySubscribers(OPSMessage newMessage) { foreach (Subscriber subscriber in subscribers) { if (subscriber.GetTopic().GetName().Equals(newMessage.GetTopicName())) { subscriber.NotifyNewOPSMessage(newMessage); } } }
public void NotifyNewOPSMessage(OPSMessage message) { //Check that this message is delivered on the same topic as this Subscriber use //This is needed when we allow several topics to use the same port if (message.GetTopicName() != topic.GetName()) { return; } ///For now we don't do this type check to minimize performance loss ////Check that the type of the delivered data can be interpreted as the type we expect in this Subscriber //if (message.GetData().GetTypesString().IndexOf(topic.GetTypeID()) < 0) //{ // return; //} if (messageFilters.ApplyFilter(message)) { this.message = message; this.NotifyNewOPSObject(message.GetData()); } }
private void NotifySubscribers(OPSMessage newMessage) { foreach (Subscriber subscriber in subscribers) { if(subscriber.GetTopic().GetName().Equals(newMessage.GetTopicName())) { subscriber.NotifyNewOPSMessage(newMessage); } } }