Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.common
Class BaseMain

    java.lang.Object
      oracle.ifs.common.BaseMain

All Implemented Interfaces:
  java.lang.Runnable, Logger

Direct Known Subclasses:
  BaseApp

    public abstract class BaseMain

extends java.lang.Object
implements java.lang.Runnable, Logger

BaseMain is a generic main for application testing and scripting.

(Published)

Field Summary
`protected java.io.PrintWriter` | `m_defaultWriter` Default writer.
`protected java.io.PrintWriter` | `m_logWriter` The Stream for writing log entries.
`protected ParameterTable` | `m_parametertable` The parameter table holding the name/value pairs.
`protected long` | `m_timervalue` A timer value - for use in displaying elapsed times.

Constructor Summary
`BaseMain(java.lang.String[] args)` Constructs a BaseMain.

Method Summary
`protected long` | `getElapsedTime()` Gets the elapsed time from when the last time setTimer() or getElapsedTime() was called.
`ParameterTable` | `getParameterTable()` Returns the ParameterTable used by this instance.
`protected void` | `initTrace()` Creates the log file.
`void` | `log()` Performs the equivalent of a PrintStream.println() to the log file.
`void` | `log(java.lang.String message)` Writes a message to the log file.
`void` | `logCurrentTimestamp()` Logs the current time to the log file.
`void` | `printStackTrace(java.lang.Throwable e)` Prints an exception stack trace to the log.
`protected void` | `setTimer()` Set the internal timer to the current time.
`protected long` | `showElapsedTime()` Print the elapsed time (from an internal call to getElapsedTime()) to the log file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.lang.Runnable
`run`

Field Detail

### m_parametertable

    protected ParameterTable m_parametertable

  Description copied from class: `BaseMain`
  The parameter table holding the name/value pairs.

### m_logWriter

    protected java.io.PrintWriter m_logWriter

  Description copied from class: `BaseMain`
  The Stream for writing log entries.

### m_timervalue

    protected long m_timervalue

  Description copied from class: `BaseMain`
  A timer value - for use in displaying elapsed times.

### m_defaultWriter

    protected java.io.PrintWriter m_defaultWriter

  Description copied from class: `BaseMain`
  Default writer.

Constructor Detail

### BaseMain

    public BaseMain(java.lang.String[] args)

  Constructs a BaseMain.

  Parameters:
    `args` - the arguments passed to main

Method Detail

### getParameterTable

    public ParameterTable getParameterTable()

  Description copied from class: `BaseMain`
  Returns the ParameterTable used by this instance.

  Returns:
    the ParameterTable

### initTrace

    protected void initTrace()

  Description copied from class: `BaseMain`
  Creates the log file.

### log

    public void log()

  Description copied from class: `BaseMain`
  Performs the equivalent of a PrintStream.println() to the log file.

  Specified by:
    `log` in interface `Logger`

### log

    public void log(java.lang.String message)

  Description copied from class: `BaseMain`
  Writes a message to the log file.

  Specified by:
    `log` in interface `Logger`
  Parameters:
    `message` - the message string to be added to the log file

### printStackTrace

    public void printStackTrace(java.lang.Throwable e)

  Description copied from class: `BaseMain`
  Prints an exception stack trace to the log.

  Specified by:
    `printStackTrace` in interface `Logger`
  Parameters:
    `e` - The Throwable to show

### logCurrentTimestamp

    public void logCurrentTimestamp()

  Description copied from class: `BaseMain`
  Logs the current time to the log file.

### setTimer

    protected void setTimer()

  Description copied from class: `BaseMain`
  Set the internal timer to the current time.

### getElapsedTime

    protected long getElapsedTime()

  Description copied from class: `BaseMain`
  Gets the elapsed time from when the last time setTimer() or getElapsedTime() was called. Time delta is in milliseconds.

  Returns:
    elapsed time in milliseconds

### showElapsedTime

    protected long showElapsedTime()

  Description copied from class: `BaseMain`
  Print the elapsed time (from an internal call to getElapsedTime()) to the log file. Also returns the elapsed time.

  Returns:
    elapsed time in miilliseconds

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD