### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.deployment

# Class OperationMonitor

java.lang.Object
java.lang.Thread
com.sas.services.deployment.OperationMonitor

All Implemented Interfaces:
  `OperationMonitorInterface`, `Runnable`

@SASScope("ALL") @BinaryCompatibilityOnly public class OperationMonitor extends Thread implements OperationMonitorInterface
Operation monitor thread.

Since:
  1.1

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Thread

  `Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler`

- ## Field Summary

  ### Fields inherited from class java.lang.Thread

  `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OperationMonitor()`
  Constructs a default instance of an operation monitor.
  `OperationMonitor(String threadName)`
  Constructs an instance of an operation monitor using the specified name for the thread.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `addThrowable(Throwable throwable)`
  Adds a throwable.
  `final Throwable[]`
  `getThrowables()`
  Gets the throwables which occurred during the monitored operation.
  `final boolean`
  `hasOperationCompleted()`
  Whether the operation has completed its execution.
  `final boolean`
  `isOK()`
  Determines whether any exceptions were encountered during the monitored operation.
  `void`
  `run()`
  Monitor's runnable method which is invoked upon completion of the execution of the monitored process.
  `final void`
  `setOperationCompleted()`
  Specifies that the operation has completed its execution.

  ### Methods inherited from class java.lang.Thread

  `activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### OperationMonitor

    public OperationMonitor()
    Constructs a default instance of an operation monitor.

  - ### OperationMonitor

    public OperationMonitor(String threadName)
    Constructs an instance of an operation monitor using the specified name for the thread.
    Parameters:
      `threadName` - Thread's name.

- ## Method Details

  - ### hasOperationCompleted

    public final boolean hasOperationCompleted()
    Whether the operation has completed its execution.
    Specified by:
      `hasOperationCompleted` in interface `OperationMonitorInterface`
    Returns:
      `true` if the operation has completed.

  - ### setOperationCompleted

    public final void setOperationCompleted()
    Specifies that the operation has completed its execution.
    Specified by:
      `setOperationCompleted` in interface `OperationMonitorInterface`

  - ### isOK

    public final boolean isOK()
    Determines whether any exceptions were encountered during the monitored operation.
    Specified by:
      `isOK` in interface `OperationMonitorInterface`
    Returns:
      `true` if no exceptions where encountered.
    See Also:
      - `OperationMonitorInterface.isOK()`

  - ### addThrowable

    public final void addThrowable(Throwable throwable)
    Adds a throwable.
    Specified by:
      `addThrowable` in interface `OperationMonitorInterface`
    Parameters:
      `throwable` - Throwable encountered during the monitored operation.
    See Also:
      - `OperationMonitorInterface.addThrowable(Throwable)`

  - ### getThrowables

    public final Throwable[] getThrowables()
    Gets the throwables which occurred during the monitored operation.
    Specified by:
      `getThrowables` in interface `OperationMonitorInterface`
    Returns:
      Throwables which were encountered during the monitored operation or an empty array if the operation was executed successfully.
    See Also:
      - `OperationMonitorInterface.getThrowables()`

  - ### run

    public void run()
    Monitor's runnable method which is invoked upon completion of the execution of the monitored process. Override this method to implement behavior customized to your use case.
    Specified by:
      `run` in interface `Runnable`
    Overrides:
      `run` in class `Thread`
    See Also:
      - `Runnable.run()`