> Hi,
>
[quoted text clipped - 10 lines]
>
> Any ideas ?
If I understood the problem statement correctly, I do not think you
have to implement the interface - you will need to call the interface
methods as you progress through the operationDel. The *caller* will
give you an implementation of this interface, which you will use as a
callback to notify the caller of various events, and the caller (I
suppose) will use this information to render a progressbar, or report
status via messages, etc.
For example, you will invoke operationListener.startedOperation(100);
where 100 is the % remaining. At the end, you will invoke
operationListener.finishedOperation().
Hope this helps!
-cheers,
Manish
mike - 30 Oct 2007 19:18 GMT
> > Hi,
>
[quoted text clipped - 22 lines]
> where 100 is the % remaining. At the end, you will invoke
> operationListener.finishedOperation().
Ok!
I am calling the interface as my task, operationDel, makes progress or
isCanceled.
Shall the class where I have my call:
myApp.operationDel( file, operationListener);
implement the interface. Seems like I cannot figure out how the
callback is working!
Or am I missing something here?
cheers,
mike
> Hope this helps!
>
> -cheers,
> Manish
Manish Pandit - 30 Oct 2007 19:47 GMT
> Ok!
>
[quoted text clipped - 7 lines]
> callback is working!
> Or am I missing something here?
Either the caller, or any other class can implement this interface.
Whoever implements it needs to be passed to the method call. The
interface methods wil be called by the method call at various points,
and the implementation will receive these callbacks (it is also called
a hook), and can use that to perform any operation. For now, you can
log a message or do a System.out.println() to understand the flow and
the callback mechanism, later you can tie it to more complex solution,
like rendering a progressbar or something similar.
-cheers,
Manish
mike - 30 Oct 2007 19:52 GMT
> > Ok!
>
[quoted text clipped - 19 lines]
> -cheers,
> Manish
Thanks Manish,
I get it now :-)