This method should be called (on the receiving host) when a message transfer was aborted. @param id Id of the message that was being transferred @param from Host the message was from (previous hop) @param bytesRemaining Nrof bytes that were left before the transfer would have been ready; or -1 if th
(String id, DTNHost from, int bytesRemaining)
| 453 | * would have been ready; or -1 if the number of bytes is not known |
| 454 | */ |
| 455 | public void messageAborted(String id, DTNHost from, int bytesRemaining) { |
| 456 | Message incoming = removeFromIncomingBuffer(id, from); |
| 457 | if (incoming == null) { |
| 458 | throw new SimError("No incoming message for id " + id + |
| 459 | " to abort in " + this.host); |
| 460 | } |
| 461 | |
| 462 | for (MessageListener ml : this.mListeners) { |
| 463 | ml.messageTransferAborted(incoming, from, this.host); |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | /** |
| 468 | * Creates a new message to the router. |
nothing calls this directly
no test coverage detected