|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.app.AppJava
public class AppJava
Entity harness for standard Java applications.
| Nested Class Summary | |
|---|---|
static interface |
AppJava.Runnable
|
| Nested classes/interfaces inherited from interface jist.swans.app.AppInterface |
|---|
AppInterface.TcpApp, AppInterface.ThreadedApp, AppInterface.UdpApp |
| Constructor Summary | |
|---|---|
AppJava(java.lang.Class app)
Create new Java application harness. |
|
AppJava(java.lang.String app)
Create new Java application harness. |
|
| Method Summary | |
|---|---|
SimtimeThread |
getCurrentThread()
Get current thread from thread context. |
AppInterface |
getProxy()
Return self-referencing entity proxy. |
TransInterface.TransTcpInterface |
getTcpEntity()
Return application TCP entity. |
TransInterface.TransUdpInterface |
getUdpEntity()
Return application UDP 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 |
setCurrentThread(SimtimeThread thread)
Set current thread in thread context. |
void |
setTcpEntity(TransInterface.TransTcpInterface tcp)
Set application TCP entity. |
void |
setUdpEntity(TransInterface.TransUdpInterface udp)
Set application UDP entity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AppJava(java.lang.Class app)
throws java.lang.NoSuchMethodException
app - main class of Java application
java.lang.NoSuchMethodException - unable to find main method in application class
public AppJava(java.lang.String app)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException
app - name of Java application class
java.lang.ClassNotFoundException - unable to load application class
java.lang.NoSuchMethodException - unable to find main method in application class| Method Detail |
|---|
public void receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
AppInterface
receive in interface AppInterfacemsg - message receivedsrc - source network addresslastHop - source link addressmacId - incoming interfacedst - destination network addresspriority - packet priorityttl - packet time-to-livepublic AppInterface getProxy()
public void setUdpEntity(TransInterface.TransUdpInterface udp)
udp - udp entitypublic TransInterface.TransUdpInterface getUdpEntity()
getUdpEntity in interface AppInterface.UdpApppublic void setTcpEntity(TransInterface.TransTcpInterface tcp)
tcp - tcp entitypublic TransInterface.TransTcpInterface getTcpEntity()
getTcpEntity in interface AppInterface.TcpApppublic void setCurrentThread(SimtimeThread thread)
setCurrentThread in interface AppInterface.ThreadedApppublic SimtimeThread getCurrentThread()
getCurrentThread in interface AppInterface.ThreadedApppublic 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 | |||||||||