M
mike
Hi,
I have the following interface OperationListener interface ( it's for
an open source project I helping out with). Well the idea behind the
interface is to monitor operations taking place simlair to the
eclipse IProgressMonitor.
Then I have an operation like:
myApp.operationDel( file, operationListener);
I don't know how to implement the interface.
Any ideas ?
cheers,
mike
public interface OperationListener {
/**
* Notifies the receiver that the specified operation has started.
*
* @param amountOfWork
* the amount of expected work
*/
void startedOperation(int amountOfWork);
/** /**
* Notifies the receiver that the specified operation finished.
* <p>
* Note that t
* Notifies the receiver about progress of the specified
operation.
*
* @param ticks
* the progress
*/
void worked(int ticks);
/**
* Notifies the receiver that an operation is still ongoing but
* that no progress information is available.
*
*/
void ping();
/**
* Notifies the receiver that the specified operation finished.
* <p>
* Note that the listener may not be notified if an exeception
occurs while
* performing the operation.
* </p>
*/
void finishedOperation();
/**
* Notifies the caller if the operation should be canceled.
*
* @return <code>true</code> if the caller (the ClearCase
interface)
* should cancel the current operation, <code>false</code>
* otherwise
*/
boolean isCanceled();
}
I have the following interface OperationListener interface ( it's for
an open source project I helping out with). Well the idea behind the
interface is to monitor operations taking place simlair to the
eclipse IProgressMonitor.
Then I have an operation like:
myApp.operationDel( file, operationListener);
I don't know how to implement the interface.
Any ideas ?
cheers,
mike
public interface OperationListener {
/**
* Notifies the receiver that the specified operation has started.
*
* @param amountOfWork
* the amount of expected work
*/
void startedOperation(int amountOfWork);
/** /**
* Notifies the receiver that the specified operation finished.
* <p>
* Note that t
* Notifies the receiver about progress of the specified
operation.
*
* @param ticks
* the progress
*/
void worked(int ticks);
/**
* Notifies the receiver that an operation is still ongoing but
* that no progress information is available.
*
*/
void ping();
/**
* Notifies the receiver that the specified operation finished.
* <p>
* Note that the listener may not be notified if an exeception
occurs while
* performing the operation.
* </p>
*/
void finishedOperation();
/**
* Notifies the caller if the operation should be canceled.
*
* @return <code>true</code> if the caller (the ClearCase
interface)
* should cancel the current operation, <code>false</code>
* otherwise
*/
boolean isCanceled();
}