|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.app.AppHeartbeat
public class AppHeartbeat
Heartbeat application.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jist.swans.app.AppInterface |
|---|
AppInterface.TcpApp, AppInterface.ThreadedApp, AppInterface.UdpApp |
| Field Summary | |
|---|---|
static short |
FRESHNESS
throw out information older than FRESHNESS beats. |
static long |
HEARTBEAT_MAX
maximum heartbeat period. |
static long |
HEARTBEAT_MIN
minimum heartbeat period. |
| Constructor Summary | |
|---|---|
AppHeartbeat(int nodenum,
boolean display)
Create new heartbeat application instance. |
|
| Method Summary | |
|---|---|
void |
dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
Notification mechanism for packet dropped due to various "Reasons" |
AppInterface |
getAppProxy()
Return self-referencing APPLICATION proxy entity. |
NetInterface.NetHandler |
getNetProxy()
Return self-referencing NETWORK proxy entity. |
void |
receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
Receive a message from network layer. |
void |
run()
Run application. |
void |
run(java.lang.String[] args)
Run application. |
void |
send(NetMessage msg)
Send a message through the routing protocol |
void |
setNetEntity(NetInterface netEntity)
Set network entity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long HEARTBEAT_MIN
public static final long HEARTBEAT_MAX
public static final short FRESHNESS
| Constructor Detail |
|---|
public AppHeartbeat(int nodenum,
boolean display)
nodenum - node identifierdisplay - whether to display application output| Method Detail |
|---|
public void setNetEntity(NetInterface netEntity)
netEntity - network entitypublic NetInterface.NetHandler getNetProxy()
public AppInterface getAppProxy()
public void dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
NetInterface.NetHandler
dropNotify in interface NetInterface.NetHandler
public void receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
receive in interface AppInterfacereceive in interface NetInterface.NetHandlermsg - message receivedsrc - source network addresslastHop - source link addressmacId - incoming interfacedst - destination network addresspriority - packet priorityttl - packet time-to-livepublic void send(NetMessage msg)
NetInterface.NetHandler
send in interface NetInterface.NetHandlerpublic void run(java.lang.String[] args)
run in interface AppInterfaceargs - command-line parameterspublic void run()
run in interface AppInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||