-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
False
-
The code in the superclass of every protocol is (from Protocol)
public void up(MessageBatch batch) { for(Iterator<Message> it=batch.iterator(); it.hasNext();) { Message msg=it.next(); if(msg != null && accept(msg)) { it.remove(); try { up(msg); } catch(Throwable t) { log.error(Util.getMessage("PassUpFailure"), t); } } } if(!batch.isEmpty()) up_prot.up(batch); }
This means that we'll iterate through the batch and call accept() for every messages, although this may not be needed.
Two solutions:
- Implement up(MessageBatch) in Protocol to call up_prot.up(batch) (simply pass the batch up). Make sure that none of the protocols rely on the above code to call accept()
- Have every protocol implement up(MessageBatch)