routing
Class PassiveRouter

java.lang.Object
  extended by routing.MessageRouter
      extended by routing.PassiveRouter

public class PassiveRouter
extends MessageRouter

Passive router that doesn't send anything unless commanded. This is useful for external event -controlled routing or dummy nodes. For implementation specifics, see MessageRouter class.


Field Summary
 
Fields inherited from class routing.MessageRouter
B_SIZE_S, DENIED_NO_SPACE, DENIED_OLD, DENIED_TTL, DENIED_UNSPECIFIED, MSG_TTL_S, msgTtl, Q_MODE_FIFO, Q_MODE_RANDOM, RCV_OK, SEND_QUEUE_MODE_S, TRY_LATER_BUSY
 
Constructor Summary
protected PassiveRouter(PassiveRouter r)
          Copy-constructor.
  PassiveRouter(Settings s)
           
 
Method Summary
 void changedConnection(Connection con)
          Informs the router about change in connections state.
 MessageRouter replicate()
          Creates a replicate of this router.
 void update()
          Updates router.
 
Methods inherited from class routing.MessageRouter
addApplication, addToMessages, compareByQueueMode, createNewMessage, deleteMessage, getApplications, getBufferSize, getFreeBufferSize, getHost, getMessage, getMessageCollection, getNrofMessages, getRoutingInfo, hasMessage, init, isDeliveredMessage, isIncomingMessage, messageAborted, messageTransferred, putToIncomingBuffer, receiveMessage, removeFromIncomingBuffer, removeFromMessages, requestDeliverableMessages, sendMessage, sortByQueueMode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PassiveRouter

public PassiveRouter(Settings s)

PassiveRouter

protected PassiveRouter(PassiveRouter r)
Copy-constructor.

Parameters:
r - Router to copy the settings from.
Method Detail

update

public void update()
Description copied from class: MessageRouter
Updates router. This method should be called (at least once) on every simulation interval to update the status of transfer(s).

Overrides:
update in class MessageRouter

changedConnection

public void changedConnection(Connection con)
Description copied from class: MessageRouter
Informs the router about change in connections state.

Specified by:
changedConnection in class MessageRouter
Parameters:
con - The connection that changed

replicate

public MessageRouter replicate()
Description copied from class: MessageRouter
Creates a replicate of this router. The replicate has the same settings as this router but empty buffers and routing tables.

Specified by:
replicate in class MessageRouter
Returns:
The replicate