Menu

#9 UDPTransport, NotifyMsgHandlers

1.5
open
nobody
Gridkit (4)
5
2007-10-22
2007-10-22
No

The method NotifyMsgHandlers forwards notifications to all available MsgHandlers. This is incorrect since notifications should only be sent to interested MsgHandlers. A Possible solution to this could be:

protected void NotifyMsgHandlers(String id, byte[] data, Object from){
for(int i=0; i<EvHandlers.size();i++){
MsgListener a = EvHandlers.get(i);
try{
if(a.ElementIdenetifier.equalsIgnoreCase(id))
a.ElementListener.Deliver(a.ElementIdenetifier,
data,data.length,from);
}
catch(Exception e){
}
}
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.