public class LifeRouter extends ActiveRouter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NM_COUNT_S
Neighboring message count -setting id ("nmcount").
|
DELETE_DELIVERED_S, deleteDelivered, RESPONSE_PREFIX, sendingConnectionsB_SIZE_S, DENIED_LOW_RESOURCES, DENIED_NO_SPACE, DENIED_OLD, DENIED_POLICY, DENIED_TTL, DENIED_UNSPECIFIED, MSG_TTL_S, msgTtl, Q_MODE_FIFO, Q_MODE_RANDOM, RCV_OK, SEND_QUEUE_MODE_S, TRY_LATER_BUSY| Modifier | Constructor and Description |
|---|---|
protected |
LifeRouter(LifeRouter r)
Copy constructor.
|
|
LifeRouter(Settings s)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
checkReceiving(Message m,
DTNHost from)
Checks if router "wants" to start receiving message (i.e.
|
LifeRouter |
replicate()
Creates a replicate of this router.
|
void |
update()
Checks out all sending connections to finalize the ready ones
and abort those whose connection went down.
|
addToSendingConnections, canStartTransfer, changedConnection, createNewMessage, dropExpiredMessages, exchangeDeliverableMessages, getConnections, getMessagesForConnected, getNextMessageToRemove, getRoutingInfo, hasEnergy, init, isSending, isTransferring, makeRoomForMessage, makeRoomForNewMessage, messageTransferred, receiveMessage, requestDeliverableMessages, shuffleMessages, startTransfer, transferAborted, transferDone, tryAllMessages, tryAllMessagesToAllConnections, tryMessagesForConnected, tryMessagesToConnectionsaddApplication, addToMessages, compareByQueueMode, deleteMessage, getApplications, getBufferSize, getFreeBufferSize, getHost, getMessage, getMessageCollection, getNrofMessages, hasMessage, isBlacklistedMessage, isDeliveredMessage, isIncomingMessage, messageAborted, putToIncomingBuffer, removeFromIncomingBuffer, removeFromMessages, sendMessage, sortByQueueMode, toStringpublic static final java.lang.String NM_COUNT_S
public LifeRouter(Settings s)
s - The settings objectprotected LifeRouter(LifeRouter r)
r - The router prototype where setting values are copied fromprotected int checkReceiving(Message m, DTNHost from)
ActiveRoutercheckReceiving in class ActiveRouterm - The message to checkMessageRouter.receiveMessage(Message, DTNHost), i.e.
MessageRouter.RCV_OK if receiving seems to be OK,
TRY_LATER_BUSY if router is transferring, DENIED_OLD if the router
is already carrying the message or it has been delivered to
this router (as final recipient), or DENIED_NO_SPACE if the message
does not fit into bufferpublic void update()
ActiveRouterupdate in class ActiveRouterActiveRouter.addToSendingConnections(Connection)public LifeRouter replicate()
MessageRouterreplicate in class MessageRouter