|
|||||||||
| 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 |
| Field Summary | |
|---|---|
private java.lang.Class |
app
application class. |
private AppInterface |
self
self-referencing proxy entity. |
private TransInterface.TransTcpInterface |
tcp
TCP entity. |
private jist.swans.app.lang.SimtimeThread |
thread
current thread. |
private TransInterface.TransUdpInterface |
udp
UDP entity. |
| Constructor Summary | |
|---|---|
AppJava(java.lang.Class app)
Create new Java application harness. |
|
AppJava(java.lang.String app)
Create new Java application harness. |
|
| Method Summary | |
|---|---|
private java.lang.reflect.Method |
findMain(java.lang.Class c)
Find main method in class. |
jist.swans.app.lang.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 |
run()
Run application. |
void |
run(java.lang.String[] args)
Run application. |
void |
setCurrentThread(jist.swans.app.lang.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 |
| Field Detail |
|---|
private AppInterface self
private java.lang.Class app
private TransInterface.TransUdpInterface udp
private TransInterface.TransTcpInterface tcp
private jist.swans.app.lang.SimtimeThread thread
| 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 |
|---|
private java.lang.reflect.Method findMain(java.lang.Class c)
throws java.lang.NoSuchMethodException
c - main class
java.lang.NoSuchMethodException - if class does not contain a main methodpublic 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(jist.swans.app.lang.SimtimeThread thread)
setCurrentThread in interface AppInterface.ThreadedApppublic jist.swans.app.lang.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 | ||||||||