Bug 124697 - Get status if a progress handle is started or not
Get status if a progress handle is started or not
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Progress
6.x
All All
: P2 with 1 vote (vote)
: TBD
Assigned To: Jan Peska
issues@platform
: API, THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-04 10:46 UTC by Jiri Rechtacek
Modified: 2011-08-30 09:54 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Rechtacek 2008-01-04 10:46:06 UTC
No way how to get status of a progress handle. I need to know if some handle was started before I need to finish it.
A possible workaround: pair handle with some status field about its status.
Comment 1 Milos Kleint 2008-01-04 11:54:21 UTC
you are finishing 3rd party handles? or how can you not know about the handle's state?
Comment 2 nigjo_iqn 2011-06-03 14:01:26 UTC
voted for this.

Why should I store the state by myself? The "internalHandle" already has a method "getState()" which could be reused.

In my case I create a new ProgressHandle instance in an own "Manager" who does some common initialization to the handle. This Manager also has "start()", "stop()" and "interrutProgressOnError()" methods. The latter may be called before "start()", after creating an instance. But in that case this method will throw an unnecessary Exception by itself without an "isStarted()" or "isRunning()" method.
Comment 3 Jesse Glick 2011-08-19 15:21:42 UTC
Probably WONTFIX - a ProgressHandle is supposed to be thread-safe, so returning a status code does not guarantee that this status is still in effect when you make another call, since there is no transactional mechanism.

You just need to keep track of what you have done with a handle so far, and not make inappropriate calls on it.
Comment 4 Jan Peska 2011-08-30 09:54:45 UTC
(In reply to comment #3)
> Probably WONTFIX - a ProgressHandle is supposed to be thread-safe, so returning
> a status code does not guarantee that this status is still in effect when you
> make another call, since there is no transactional mechanism.
> 
> You just need to keep track of what you have done with a handle so far, and not
> make inappropriate calls on it.

-> WONTFIX


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo