@Contract public interface RunLevelListener
Lengthy operations should not be performed in the listener since that may impact the performance of the RunLevelController calling the listener.
Modifier and Type | Method and Description |
---|---|
void |
onCancelled(RunLevelFuture currentJob,
int levelAchieved)
Called when an RunLevelController implementation's proceedTo() operation
has been canceled for some reason.
|
void |
onError(RunLevelFuture currentJob,
ErrorInformation errorInformation)
Called when a service throws an exception during a proceedTo
operation
|
void |
onProgress(ChangeableRunLevelFuture currentJob,
int levelAchieved)
Called when the RunLevelController advances to the next level
|
void onProgress(ChangeableRunLevelFuture currentJob, int levelAchieved)
Neither RunLevelController.proceedTo(int)
nor
RunLevelController.proceedToAsync(int)
may be called from this method. However,
ChangeableRunLevelFuture.changeProposedLevel(int)
may be called
Any exception thrown from this method is ignored
currentJob
- the job currently runninglevelAchieved
- the level just achieved by the currentJob. Note
that if the currentJob is going up then the levelAchieved will
be the level for which all the services in that level were just started.
When going down the levelAchieved will be the level for which
all the services ABOVE that level have been shutdown. In all cases the
levelAchieved represents the current level of the system.void onCancelled(RunLevelFuture currentJob, int levelAchieved)
Neither RunLevelController.proceedTo(int)
nor
RunLevelController.proceedToAsync(int)
may be called from this method
Any exception thrown from this method is ignored
currentJob
- the job currently runninglevelAchieved
- the level just achieved by the currentJob. Note
that if the currentJob is currently going up then the levelAchieved will
be the level for which all the services in that level were just started
while when going down the levelAchieved will be the level for which
all the services ABOVE that level have been shutdown. In both cases
the levelAchieved represents the current level of the systemvoid onError(RunLevelFuture currentJob, ErrorInformation errorInformation)
Neither RunLevelController.proceedTo(int)
nor
RunLevelController.proceedToAsync(int)
may be called from this method
Any exception thrown from this method is ignored
currentJob
- the run level controllererrorInformation
- information about the error that had been caughtCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.