@Service public class KernelListener extends Object implements RunLevelListener
Constructor and Description |
---|
KernelListener() |
Modifier and Type | Method and Description |
---|---|
void |
onCancelled(RunLevelFuture future,
int runLevel)
Called when an RunLevelController implementation's proceedTo() operation
has been canceled for some reason.
|
void |
onError(RunLevelFuture future,
ErrorInformation errorInfo)
Called when a service throws an exception during a proceedTo
operation
|
void |
onProgress(ChangeableRunLevelFuture future,
int runLevel)
Called when the RunLevelController advances to the next level
|
public void onProgress(ChangeableRunLevelFuture future, int runLevel)
RunLevelListener
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
onProgress
in interface RunLevelListener
future
- the job currently runningrunLevel
- 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.public void onCancelled(RunLevelFuture future, int runLevel)
RunLevelListener
Neither RunLevelController.proceedTo(int)
nor
RunLevelController.proceedToAsync(int)
may be called from this method
Any exception thrown from this method is ignored
onCancelled
in interface RunLevelListener
future
- the job currently runningrunLevel
- 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 systempublic void onError(RunLevelFuture future, ErrorInformation errorInfo)
RunLevelListener
Neither RunLevelController.proceedTo(int)
nor
RunLevelController.proceedToAsync(int)
may be called from this method
Any exception thrown from this method is ignored
onError
in interface RunLevelListener
future
- the run level controllererrorInfo
- information about the error that had been caughtCopyright © 2009–2023 Oracle Corporation. All rights reserved.