ABLE, Version 1.1b

com.ibm.able.platform
Class PlatformTracerSupport

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--com.ibm.able.platform.PlatformTracerSupport

public class PlatformTracerSupport
extends java.rmi.server.UnicastRemoteObject
implements PlatformTracer, java.io.Serializable

This class defines an implementation of an ABLE PlatformTracer object.

Tracer objects may be found in some ABLE objects; in particular, those that support the 'getTracer()' method. Tracer objects can be used to control (even remotely) when and how a containing object will produce trace messages (as opposed to debug messages, which are either compiled in or completely compiled out of a program at build time).

Trace messages are runtime messages. Trace messages can be turned on and off programmatically, and they can be directed to the Java console or batched up in internal queues that can be retrieved and examined by other programs.

Version:
$Revision: 1.1 $, $Date: 2000/02/08 15:13:55 $
See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
PlatformTracerSupport()
          Create a new trace object.
 
Method Summary
 void clearBatchLog()
          Clear the batch trace log.
static java.lang.String Copyright()
          Determine the copyright of this class.
 void dumpBatchLog()
          Dump the batch trace log to the Java console.
 java.util.Vector getBatchLog()
          Retrieve the batch trace log.
 boolean isActive()
          Determine whether tracing is active.
 void logTrace(java.lang.String theTraceMsg)
          Log a trace message.
 void setActive(boolean theTraceFlag)
          Enable or disable tracing.
 void setBatch(boolean theBatchFlag)
          Enable or disable batch tracing.
 java.lang.String toString()
          Retrieve a string describing (the contents of) the object.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlatformTracerSupport

public PlatformTracerSupport()
                      throws java.rmi.RemoteException
Create a new trace object.
Method Detail

isActive

public boolean isActive()
                 throws java.rmi.RemoteException
Determine whether tracing is active.
Specified by:
isActive in interface PlatformTracer
Returns:
true if tracing is active; false otherwise.

setActive

public void setActive(boolean theTraceFlag)
               throws java.rmi.RemoteException
Enable or disable tracing.
Specified by:
setActive in interface PlatformTracer
Parameters:
theTraceFlag - Use true to enable tracing. Use false to disable tracing.


setBatch

public void setBatch(boolean theBatchFlag)
              throws java.rmi.RemoteException
Enable or disable batch tracing. When batch tracing is enabled, trace messages are not immediately displayed, but are saved in a Vector for later retrieval. When disabled, all messages are written out using System.out.println().
Specified by:
setBatch in interface PlatformTracer
Parameters:
theBatchFlag - Use true to enable tracing. Use false to disable tracing.

See Also:
getBatchLog(), dumpBatchLog()

clearBatchLog

public void clearBatchLog()
                   throws java.rmi.RemoteException
Clear the batch trace log.
Specified by:
clearBatchLog in interface PlatformTracer

getBatchLog

public java.util.Vector getBatchLog()
                             throws java.rmi.RemoteException
Retrieve the batch trace log.
Specified by:
getBatchLog in interface PlatformTracer
Returns:
A Vector containing String objects. Note that the vector may be empty.

dumpBatchLog

public void dumpBatchLog()
                  throws java.rmi.RemoteException
Dump the batch trace log to the Java console.
Specified by:
dumpBatchLog in interface PlatformTracer

logTrace

public void logTrace(java.lang.String theTraceMsg)
Log a trace message.

If batch tracing is active, the trace message is stored internally in a Vector, which may be retrieved later, or dumped to the Java console.

If batch tracing is not active, the trace message is written out to the Java console using System.out.println().

Parameters:
theTraceMsg - Any Java String object.

See Also:
getBatchLog(), dumpBatchLog()

toString

public java.lang.String toString()
Retrieve a string describing (the contents of) the object.
Returns:
A String containing the current contents of the object.
Overrides:
toString in class java.rmi.server.RemoteObject

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.

ABLE, Version 1.1b

ABLE: Produced by Joe, Don, and Jeff who say, 'Thanks for your support.'