IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.services
Class SimpleLogAdapter

java.lang.Object
  extended by com.rational.test.ft.services.SimpleLogAdapter
All Implemented Interfaces:
ISimpleLog
Direct Known Subclasses:
LogAdapter

public class SimpleLogAdapter
extends java.lang.Object
implements ISimpleLog

The base implementation of the log interface.


Field Summary
 
Fields inherited from interface com.rational.test.ft.services.ISimpleLog
DISABLE_LOGGING, EVENT_APPLICATION_END, EVENT_APPLICATION_START, EVENT_APPLICATON_ACTION, EVENT_CALL_SCRIPT, EVENT_CONFIGURATION, EVENT_EXPORT, EVENT_GENERAL, EVENT_SCRIPT_END, EVENT_SCRIPT_START, EVENT_TIMER_END, EVENT_TIMER_START, EVENT_VP, LOG_DISABLE_GUI_ACTION, LOG_DISABLE_GUI_SNAPSHOT_ACTION, LOG_ENABLE_GUI_ACTION, LOG_ENABLE_GUI_SNAPSHOT_ACTION, LOG_FAILURE, LOG_FAILURES, LOG_FAILURES_WARNINGS, LOG_FAILURES_WARNINGS_PASS, LOG_FAILURES_WARNINGS_PASS_INFO, LOG_INFORMATION, LOG_PASS, LOG_WARNING
 
Constructor Summary
SimpleLogAdapter()
          Constructor
 
Method Summary
 void close()
          Close the log, releasing any resources.
 ILogMessage createMessage()
          Create an instance of a log message.
 ILogMessage createMessage(int resultCode, int eventCode, java.lang.String headline)
          Create an instance of a log message specifying the status, event and note.
 void open()
          Opens the log
 boolean openLogViewer()
          The callback function to open the viewer for the log.
 void write(ILogMessage message)
          Write a message into the log.
 void write(int resultCode, int eventCode, java.lang.String note)
          Write a message into the log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLogAdapter

public SimpleLogAdapter()
Constructor

Method Detail

open

public void open()
          throws LogException
Opens the log

Specified by:
open in interface ISimpleLog
Throws:
LogException

close

public void close()
Close the log, releasing any resources. This should be called when done with the log.

Specified by:
close in interface ISimpleLog

write

public void write(int resultCode,
                  int eventCode,
                  java.lang.String note)
Write a message into the log. This interface allows a simple message to be set into the log file.

Specified by:
write in interface ISimpleLog
Parameters:
resultCode - One of the LOG_ codes.
eventCode - One of the EVENT_ codes.
note - Simple (one line) description of the message being specified.
See Also:
ISimpleLog.LOG_FAILURE, ISimpleLog.LOG_PASS, ISimpleLog.LOG_WARNING, ISimpleLog.LOG_INFORMATION, ISimpleLog.EVENT_SCRIPT_START, ISimpleLog.EVENT_SCRIPT_END, ISimpleLog.EVENT_VP, ISimpleLog.EVENT_CALL_SCRIPT, ISimpleLog.EVENT_APPLICATION_START, ISimpleLog.EVENT_APPLICATION_END, ISimpleLog.EVENT_TIMER_START, ISimpleLog.EVENT_TIMER_END, ISimpleLog.EVENT_CONFIGURATION, ISimpleLog.EVENT_GENERAL

write

public void write(ILogMessage message)
Write a message into the log. The ILogMessage allows more detailed information to be written in the log file (i.e. name/value pairs).

Specified by:
write in interface ISimpleLog
Parameters:
message - The message (i.e. resultCode, eventCode, note, and details)
See Also:
ISimpleLog.LOG_FAILURE, ISimpleLog.LOG_PASS, ISimpleLog.LOG_WARNING, ISimpleLog.LOG_INFORMATION, ISimpleLog.EVENT_SCRIPT_START, ISimpleLog.EVENT_SCRIPT_END, ISimpleLog.EVENT_VP, ISimpleLog.EVENT_CALL_SCRIPT, ISimpleLog.EVENT_APPLICATION_START, ISimpleLog.EVENT_APPLICATION_END, ISimpleLog.EVENT_TIMER_START, ISimpleLog.EVENT_TIMER_END, ISimpleLog.EVENT_CONFIGURATION, ISimpleLog.EVENT_GENERAL

createMessage

public ILogMessage createMessage()
Create an instance of a log message. The ILogMessage allows more detailed information to be written to the log file (i.e. name/value pairs).

Specified by:
createMessage in interface ISimpleLog

createMessage

public ILogMessage createMessage(int resultCode,
                                 int eventCode,
                                 java.lang.String headline)
Create an instance of a log message specifying the status, event and note. The ILogMessage allows more detailed information to be written to the log file (i.e. name/value pairs)

Specified by:
createMessage in interface ISimpleLog
Parameters:
resultCode - One of the LOG_ codes.
eventCode - One of the EVENT_ codes.
headline - Simple (one line) description of the message being specified.

openLogViewer

public boolean openLogViewer()
The callback function to open the viewer for the log. Overwrite to open the log at the end of the playback.

Specified by:
openLogViewer in interface ISimpleLog
Returns:
true, on successfull opening of log viewer, false otherwise