MicroTAPAS.debug
Class Debug

java.lang.Object
  |
  +--MicroTAPAS.debug.Debug
All Implemented Interfaces:
java.lang.Runnable

public class Debug
extends java.lang.Object
implements java.lang.Runnable

Simple class to facilitate sending DebugEvents to DebugServer. The actual sending of the events are done by using a thread, because otherwise the system would hang for as long as the object is trying to connect to the server. Once the connection to the server failes, all subsequent calls to this instance will fail. (i.e. no re-initiation of connetion)


Constructor Summary
Debug(java.lang.String location)
          Constructor
Debug(java.lang.String pAddress, int pPort)
          Deprecated. Use Debug(String address) instead, where address is on the form :
 
Method Summary
 java.lang.String getAddress()
          Returns the concatenated address of the debug server
 void run()
          Implemnts the required run method of the Runnable interface
 boolean send(DebugEvent de)
          Adds a 'DebugEvent' to the local vector.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug

public Debug(java.lang.String pAddress,
             int pPort)
Deprecated. Use Debug(String address) instead, where address is on the form :

Constructor

Parameters:
pAddress - The address of the DebugServer.
pPort - The port on the DebugServer that is open for receiving DebugEvents.

Debug

public Debug(java.lang.String location)
Constructor

Method Detail

run

public void run()
Implemnts the required run method of the Runnable interface

Specified by:
run in interface java.lang.Runnable

send

public boolean send(DebugEvent de)
Adds a 'DebugEvent' to the local vector. The thread sends these events asynchronously to the server. If the server is not active, severe DebugEvents (FATAL, FAULT & WARNING) are printed to standard out.

Parameters:
de - The DebugEvent to be sent to the DebugServer.
Returns:
Success indicator; FALSE indicates that thread is not running, and is probably due to DebugServer not running.

getAddress

public java.lang.String getAddress()
Returns the concatenated address of the debug server

Returns:
The address of the debug server