|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--MicroTAPAS.ComCenter
This class implements a communication center for all the communicaiton that takes place between TAPAS nodes.
| Field Summary | |
private java.net.Socket |
client
Temporary socket for handling communication |
private static int |
comPort
The ports to listen to/send from |
private static boolean |
DEBUG
Determines whether debug info to be sent to debug-server |
private boolean |
isActive
Indicates wheter the listen-loop should be active |
private boolean |
isPNESServer
Indicates wether this entity is used for regualr traffic or debug traffic. |
private static int |
numOpenOut
|
private static int |
numReceived
Statistics |
private static int |
numSent
|
private java.io.ObjectInputStream |
oip
Strem to read objects from the socket |
private java.lang.Object |
parent
Reference to the local MicroPNES/DebugServer instance |
private java.net.ServerSocket |
server
Socket for incomming request/result |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
ComCenter(DebugServer pParent,
int pComPort)
Constructor |
|
ComCenter(MicroPNES pParent)
Constructor |
|
| Method Summary | |
void |
destroy()
Method to shut down the server |
private void |
listen()
Main method for incomming requests |
void |
run()
Implement the run() method of the Thread interface. |
RequestResult |
send(RequestPars rp)
Main method for outgoing requests |
private void |
sendDebug(DebugEvent de)
Method to send debug events to the debug server. |
Item |
status()
Status report of ComCenter in Item hierarchy of information elements. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final boolean DEBUG
private java.lang.Object parent
private boolean isPNESServer
private java.net.ServerSocket server
private java.net.Socket client
private java.io.ObjectInputStream oip
private static int comPort
private boolean isActive
private static int numReceived
private static int numSent
private static int numOpenOut
| Constructor Detail |
public ComCenter(MicroPNES pParent)
pParent - Reference to the local MicroPNES instance
public ComCenter(DebugServer pParent,
int pComPort)
pParent - Reference to the DebugServer instancepComPort - The port number to listen for incomming requests| Method Detail |
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void destroy()
destroy in class java.lang.Thread
private void listen()
throws java.lang.Exception
java.lang.Exceptionpublic RequestResult send(RequestPars rp)
rp - The request to be sent to the receiver indicated in the object
private void sendDebug(DebugEvent de)
public Item status()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||