Deletes a message from the buffer and informs message listeners about the event @param id Identifier of the message to delete @param drop If the message is dropped (e.g. because of full buffer) this should be set to true. False value indicates e.g. remove of message because it was delivered to final
(String id, boolean drop)
| 485 | * because it was delivered to final destination. |
| 486 | */ |
| 487 | public void deleteMessage(String id, boolean drop) { |
| 488 | Message removed = removeFromMessages(id); |
| 489 | if (removed == null) throw new SimError("no message for id " + |
| 490 | id + " to remove at " + this.host); |
| 491 | |
| 492 | for (MessageListener ml : this.mListeners) { |
| 493 | ml.messageDeleted(removed, this.host, drop); |
| 494 | } |
| 495 | } |
| 496 | |
| 497 | /** |
| 498 | * Sorts/shuffles the given list according to the current sending queue |
no test coverage detected