Help to implement OperationListener interface.



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();
}

.



Relevant Pages

  • Problem getting events from C# to VJ++
    ... interface IWeatherEvents: IUnknown ... public delegate void WeatherChangedDelegate(int nTemperature); ... // float Temperature ... private float m_fTemperature = 0; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Question about Java updates installed?
    ... public long add(int a, int b) ... either encapsulate the add method in an interface and then ... void test() throws Exception { ... A multicast delegate was also possible. ...
    (comp.lang.java.advocacy)
  • Re: com interop
    ... with showing a movie, and yet, you want the spell checker from word? ... > i need to know what interface ms-word's spell checker uses. ... > void Pause(); ... > // DisplayUsage(); ...
    (microsoft.public.dotnet.languages.csharp)
  • System.TypeLoadException and explicit interface implementation
    ... an assembly that is simply declaring an interface and a value type used ... Method DoSomething in type TestClass from assembly ... In the console application ... void DoSomething(); ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Abstract interfaces and classes - Urgent Help
    ... public abstract interface Interface_A: _Interface_B, ... public abstract new void method1; ... public virtual new void method3() ... Public class _MyClass: OCXReference.InterfaceClass ...
    (microsoft.public.dotnet.languages.csharp)