|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrouting.MessageRouter
routing.ActiveRouter
routing.FirstContactRouter
public class FirstContactRouter
First contact router which uses only a single copy of the message (or fragments) and forwards it to the first available contact.
| Field Summary |
|---|
| Fields inherited from class routing.ActiveRouter |
|---|
DELETE_DELIVERED_S, deleteDelivered, RESPONSE_PREFIX, sendingConnections, TTL_CHECK_INTERVAL |
| 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 |
FirstContactRouter(FirstContactRouter r)
Copy constructor. |
|
FirstContactRouter(Settings s)
Constructor. |
| Method Summary | |
|---|---|
protected int |
checkReceiving(Message m)
Checks if router "wants" to start receiving message (i.e. |
FirstContactRouter |
replicate()
Creates a replicate of this router. |
protected void |
transferDone(Connection con)
Method is called just before a transfer is finalized at ActiveRouter.update(). |
void |
update()
Checks out all sending connections to finalize the ready ones and abort those whose connection went down. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FirstContactRouter(Settings s)
s - The settings objectprotected FirstContactRouter(FirstContactRouter r)
r - The router prototype where setting values are copied from| Method Detail |
|---|
protected int checkReceiving(Message m)
ActiveRouter
checkReceiving in class ActiveRouterm - The message to check
MessageRouter.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()
ActiveRouter
update in class ActiveRouterActiveRouter.addToSendingConnections(Connection)protected void transferDone(Connection con)
ActiveRouterActiveRouter.update().
Subclasses that are interested of the event may want to override this.
transferDone in class ActiveRoutercon - The connection whose transfer was finalizedpublic FirstContactRouter replicate()
MessageRouter
replicate in class MessageRouter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||