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

com.sas.services.deployment
Class OperationMonitor

com.sas.services.deployment.OperationMonitor
All Implemented Interfaces:
OperationMonitorInterface, java.lang.Runnable

public class OperationMonitor
implements OperationMonitorInterface

Operation monitor thread.

Since:
1.1

Constructor Summary
OperationMonitor()
          Constructs a default instance of an operation monitor.
OperationMonitor(java.lang.String threadName)
          Constructs an instance of an operation monitor using the specified name for the thread.
 
Method Summary
 void addThrowable(java.lang.Throwable throwable)
          Adds a throwable.
 java.lang.Throwable[] getThrowables()
          Gets the throwables which occurred during the monitored operation.
 boolean hasOperationCompleted()
          Whether the operation has completed its execution.
 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.
 void setOperationCompleted()
          Specifies that the operation has completed its execution.
 

Constructor Detail

OperationMonitor

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


OperationMonitor

public OperationMonitor(java.lang.String threadName)
Constructs an instance of an operation monitor using the specified name for the thread.

Parameters:
threadName - Thread's name.
Method Detail

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(java.lang.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 java.lang.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 java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Runnable.run()

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.