Uses of Class
core.Message

Packages that use Message
core Contains core classes and interfaces of the simulator. 
gui Contains the classes of Graphical User Interface. 
report Contains all the report classes. 
routing Contains all the router classes who decide how to handle the messages. 
test Provides some unit and integration tests for the classes. 
 

Uses of Message in core
 

Methods in core that return Message
 Message Connection.getMessage()
          Gets the message that this connection is currently transferring.
 Message Message.getRequest()
          Returns the message this message is response to or null if this is not a response message
 Message Message.replicate()
          Returns a replicate of this message (identical except for the unique id)
 

Methods in core that return types with arguments of type Message
 java.util.Collection<Message> DTNHost.getMessageCollection()
          Returns the messages in a collection.
 

Methods in core with parameters of type Message
 int Message.compareTo(Message m)
          Compares two messages by their ID (alphabetically).
protected  void Message.copyFrom(Message m)
          Deep copies message data from other message.
 void DTNHost.createNewMessage(Message m)
          Creates a new message to this host's router
 void MessageListener.messageDeleted(Message m, DTNHost where, boolean dropped)
          Method is called when a message is deleted
 void MessageListener.messageTransferAborted(Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer was aborted before it finished
 void MessageListener.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
          Method is called when a message is succesfully transferred from a node to another.
 void MessageListener.messageTransferStarted(Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer is started
 void MessageListener.newMessage(Message m)
          Method is called when a new message is created
 int DTNHost.receiveMessage(Message m, DTNHost from)
          Start receiving a message from another host
 void Message.setRequest(Message request)
          If this message is a response to a request, sets the request message
 int Connection.startTransfer(DTNHost from, Message m)
          Sets a message that this connection is currently transferring.
 

Uses of Message in gui
 

Methods in gui with parameters of type Message
 void EventLogPanel.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void EventLogPanel.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void EventLogPanel.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
           
 void EventLogPanel.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void EventLogPanel.newMessage(Message m)
           
 void InfoPanel.showInfo(Message message)
          Show information about a message
 

Uses of Message in report
 

Methods in report with parameters of type Message
 void MessageStatsReport.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void MessageGraphvizReport.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void MessageDeliveryReport.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void MessageDelayReport.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void DTN2Reporter.messageDeleted(Message m, DTNHost where, boolean dropped)
          Method is called when a message is deleted
 void DistanceDelayReport.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void DeliveredMessagesReport.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void MessageStatsReport.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void MessageGraphvizReport.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void MessageDeliveryReport.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void MessageDelayReport.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void DTN2Reporter.messageTransferAborted(Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer was aborted before it finished
 void DistanceDelayReport.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void DeliveredMessagesReport.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void MessageStatsReport.messageTransferred(Message m, DTNHost from, DTNHost to, boolean finalTarget)
           
 void MessageGraphvizReport.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
           
 void MessageDeliveryReport.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
           
 void MessageDelayReport.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
           
 void DTN2Reporter.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
          Method is called when a message is successfully transferred from a node to another.
 void DistanceDelayReport.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
          This is called when a message is transferred between nodes
 void DeliveredMessagesReport.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
           
 void MessageStatsReport.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void MessageGraphvizReport.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void MessageDeliveryReport.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void MessageDelayReport.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void DTN2Reporter.messageTransferStarted(Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer is started
 void DistanceDelayReport.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void DeliveredMessagesReport.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void MessageStatsReport.newMessage(Message m)
           
 void MessageGraphvizReport.newMessage(Message m)
           
 void MessageDeliveryReport.newMessage(Message m)
           
 void MessageDelayReport.newMessage(Message m)
           
 void DTN2Reporter.newMessage(Message m)
          Method is called when a new message is created
 void DistanceDelayReport.newMessage(Message m)
          This is called when a new message is created
 void DeliveredMessagesReport.newMessage(Message m)
           
 

Uses of Message in routing
 

Methods in routing that return Message
protected  Message MessageRouter.getMessage(java.lang.String id)
          Returns a message by ID.
protected  Message MaxPropRouter.getOldestMessage(boolean excludeMsgBeingSent)
          Returns the next message that should be dropped, according to MaxProp's message ordering scheme (see MaxPropTupleComparator).
protected  Message ActiveRouter.getOldestMessage(boolean excludeMsgBeingSent)
          Returns the oldest (by receive time) message in the message buffer (that is not being sent if excludeMsgBeingSent is true).
 Message SprayAndWaitRouter.messageTransferred(java.lang.String id, DTNHost from)
           
 Message MessageRouter.messageTransferred(java.lang.String id, DTNHost from)
          This method should be called (on the receiving host) after a message was successfully transferred.
 Message MaxPropRouter.messageTransferred(java.lang.String id, DTNHost from)
           
 Message ActiveRouter.messageTransferred(java.lang.String id, DTNHost from)
           
protected  Message MessageRouter.removeFromIncomingBuffer(java.lang.String id, DTNHost from)
          Removes and returns a message with a certain ID from the incoming messages buffer or null if such message wasn't found.
protected  Message MessageRouter.removeFromMessages(java.lang.String id)
          Removes and returns a message from the message buffer.
protected  Message ActiveRouter.tryAllMessages(Connection con, java.util.List<Message> messages)
          Goes trough the messages until the other node accepts one for receiving (or doesn't accept any).
 

Methods in routing that return types with arguments of type Message
 java.util.Collection<Message> MessageRouter.getMessageCollection()
          Returns a reference to the messages of this router in collection
protected  java.util.List<Tuple<Message,Connection>> ActiveRouter.getMessagesForConnected()
          Returns a list of message-connections tuples of the messages whose recipient is some host that we're connected to at the moment.
protected  Tuple<Message,Connection> ActiveRouter.tryMessagesForConnected(java.util.List<Tuple<Message,Connection>> tuples)
          Tries to send messages for the connections that are mentioned in the Tuples in the order they are in the list until one of the connections starts transferring or all tuples have been tried.
 

Methods in routing with parameters of type Message
protected  void MessageRouter.addToMessages(Message m, boolean newMessage)
          Adds a message to the message buffer and informs message listeners about new message (if requested).
protected  int FirstContactRouter.checkReceiving(Message m)
           
protected  int ActiveRouter.checkReceiving(Message m)
          Checks if router "wants" to start receiving message (i.e. router isn't transferring, doesn't have the message and has room for it).
protected  int MessageRouter.compareByQueueMode(Message m1, Message m2)
          Gives the order of the two given messages as defined by the current queue mode
 boolean SprayAndWaitRouter.createNewMessage(Message msg)
           
 boolean MessageRouter.createNewMessage(Message m)
          Creates a new message to the router.
 boolean ActiveRouter.createNewMessage(Message m)
           
protected  boolean MessageRouter.isDeliveredMessage(Message m)
          Returns true if a full message with same ID as the given message has been received by this host as the final recipient (at least once).
protected  void MessageRouter.putToIncomingBuffer(Message m, DTNHost from)
          Puts a message to incoming messages buffer.
 int SprayAndWaitRouter.receiveMessage(Message m, DTNHost from)
           
 int MessageRouter.receiveMessage(Message m, DTNHost from)
          Try to start receiving a message from another host.
 int ActiveRouter.receiveMessage(Message m, DTNHost from)
           
protected  int ActiveRouter.startTransfer(Message m, Connection con)
          Tries to start a transfer of message using a connection.
 

Method parameters in routing with type arguments of type Message
protected  void ActiveRouter.shuffleMessages(java.util.List<Message> messages)
          Shuffles a messages list so the messages are in random order.
protected  Message ActiveRouter.tryAllMessages(Connection con, java.util.List<Message> messages)
          Goes trough the messages until the other node accepts one for receiving (or doesn't accept any).
protected  Tuple<Message,Connection> ActiveRouter.tryMessagesForConnected(java.util.List<Tuple<Message,Connection>> tuples)
          Tries to send messages for the connections that are mentioned in the Tuples in the order they are in the list until one of the connections starts transferring or all tuples have been tried.
protected  Connection ActiveRouter.tryMessagesToConnections(java.util.List<Message> messages, java.util.List<Connection> connections)
          Tries to send all given messages to all given connections.
 

Uses of Message in test
 

Fields in test declared as Message
 Message TestDTNHost.recvMessage
           
 

Methods in test that return Message
 Message MessageChecker.getLastMsg()
           
 

Methods in test with parameters of type Message
 void MessageChecker.messageDeleted(Message m, DTNHost where, boolean dropped)
           
 void MessageChecker.messageTransferAborted(Message m, DTNHost from, DTNHost to)
           
 void MessageChecker.messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
           
 void MessageChecker.messageTransferStarted(Message m, DTNHost from, DTNHost to)
           
 void MessageChecker.newMessage(Message m)
           
 int TestDTNHost.receiveMessage(Message m, DTNHost from)