atropos.log
Class HtmlDebug

java.lang.Object
  |
  +--atropos.log.HtmlDebug
All Implemented Interfaces:
java.io.Serializable

public class HtmlDebug
extends java.lang.Object
implements java.io.Serializable

This class write HTML files so that a browser can be used to examine log files.

This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Field Summary
static int CANCELLATION
          Indicates a CANCELLATION has occurred.
static int RCVACROSS
          Message is RECEIVED from across the web page.
static int RCVDOWN
          Message is RECEIVED from above within the web page.
static int ROLLBACK
          Indicates a ROLLBACK has occurred.
static int SNDACROSS
          Message is SENT across the web page.
static int SNDDOWN
          Message is SENT downwards within the web page.
static int STATE
          Indicates system STATE information.
 
Constructor Summary
HtmlDebug()
          Stub for now.
 
Method Summary
 void addEntry(long time, long lvt, java.lang.String level, AvnmpPacket ap, int direction, AvnmpLP mylp, AvnmpTime t)
          Add an entry to the debug HTML file.
 void addEntry(long time, long lvt, java.lang.String level, java.lang.String mes)
          Add an entry to the debug HTML file.
 void addEntry(long time, long lvt, java.lang.String level, java.lang.String mes, int direction)
          Add an entry to the debug HTML file.
 void done()
          Complete the main HTML log file.
 java.lang.String repString(java.lang.String in, java.lang.String rep, java.lang.String with)
          Replace all occurances of one string with another.
 void setNodeName(java.lang.String nodename, AvnmpLP lp)
          Set the node name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNDACROSS

public static final int SNDACROSS
Message is SENT across the web page.

SNDDOWN

public static final int SNDDOWN
Message is SENT downwards within the web page.

RCVACROSS

public static final int RCVACROSS
Message is RECEIVED from across the web page.

RCVDOWN

public static final int RCVDOWN
Message is RECEIVED from above within the web page.

STATE

public static final int STATE
Indicates system STATE information.

ROLLBACK

public static final int ROLLBACK
Indicates a ROLLBACK has occurred.

CANCELLATION

public static final int CANCELLATION
Indicates a CANCELLATION has occurred.
Constructor Detail

HtmlDebug

public HtmlDebug()
Stub for now. Does nothing.
Method Detail

setNodeName

public void setNodeName(java.lang.String nodename,
                        AvnmpLP lp)
Set the node name.
Parameters:
nodename - The node's active name.

done

public void done()
Complete the main HTML log file.

addEntry

public void addEntry(long time,
                     long lvt,
                     java.lang.String level,
                     AvnmpPacket ap,
                     int direction,
                     AvnmpLP mylp,
                     AvnmpTime t)
Add an entry to the debug HTML file. Note that there is a main web page which is updated, then a link to the file containing the actual entry is created.
Parameters:
time - The real time this log occurred.
lvt - The LVT this log occurred.
level - The debug level name.
ap - The AVNMP packet.
direction - Choose one of the options in "See Also" below.
mylp - The current AVNMP LP.
t - The LP's real time when this log message was generated.
See Also:
SNDACROSS, SNDDOWN, RCVACROSS, RCVDOWN, STATE, ROLLBACK, CANCELLATION

addEntry

public void addEntry(long time,
                     long lvt,
                     java.lang.String level,
                     java.lang.String mes,
                     int direction)
Add an entry to the debug HTML file. Note that there is a main web page which is updated, then a link to the file containing the actual entry is created.
Parameters:
time - The real time this log occurred.
lvt - The LVT this log occurred.
level - The debug level name.
direction - Choose one of the options in "See Also" below.
mes - The message to be written to the log file.
See Also:
SNDACROSS, SNDDOWN, RCVACROSS, RCVDOWN, STATE, ROLLBACK, CANCELLATION

addEntry

public void addEntry(long time,
                     long lvt,
                     java.lang.String level,
                     java.lang.String mes)
Add an entry to the debug HTML file. Note that there is a main web page which is updated, then a link to the file containing the actual entry is created.
Parameters:
time - The real time this log occurred.
lvt - The LVT this log occurred.
level - The debug level name.
mes - The message to be written to the log file.

repString

public java.lang.String repString(java.lang.String in,
                                  java.lang.String rep,
                                  java.lang.String with)
Replace all occurances of one string with another.
Parameters:
in - The input string
rep - The replacement string.
with - The string replacing the above string.
Returns:
The new string formed by replacing all occurances in "in" of "rep" with "with".


Copyright © 2002 GE Corporate Research and Development. All Rights Reserved.