I guess I'd like to understand your use case, since I think you can use
the RunLevelListener to determine if the job is complete.
Basically, if you were to do something like this:
public void onProgress(ChangeableRunLevelFuture <
https://hk2.java.net/2.2.0-b26/apidocs/org/glassfish/hk2/runlevel/ChangeableRunLevelFuture.html> currentJob,
int levelAchieved){
if (currentJob.getProposedLevel() == levelAchieved) {
// The job is finished
}
else {
// The job is not finished yet
}
}
I think you would have what you wanted, right?
On 12/17/2013 4:46 AM, Tang Yong wrote:
> About the question, I also searched the source and [1],
>
> The best way should use RunLevelListener, however, RunLevelListener does
> not off an api for task completed.
>
> [1]:https://hk2.java.net/2.2.0-b26/runlevel.html
>
> Thanks
> Tang
>
> Tang Yong wrote:
>> Hi JWells, Mason,
>>
>> I have an urgent question about RunLevelControllerThread,
>>
>> While using the following way to move to the given run level,
>>
>> RunLevelController.proceedTo(runLevel)
>>
>> I want to know whether having any way to know when the
>> RunLevelControllerThread has been ended?
>>
>> Thanks
>> Tang
>>