Class AsyncRunLevelContext
- java.lang.Object
-
- org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext
-
@Service @Visibility(LOCAL) public class AsyncRunLevelContext extends Object
- Author:
- jwells
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(ActiveDescriptor<?> descriptor)
TheContext
API for discovering if a descriptor has been createdvoid
destroyOne(ActiveDescriptor<?> descriptor)
TheContext
API.<U> U
findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)
This is from theContext
API, called by the wrapperRunLevelFuture
getCurrentFuture()
Gets the current taskRunLevelFuture
proceedTo(int level)
This method is called to change the proceedTo level of the system
-
-
-
Method Detail
-
findOrCreate
public <U> U findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)
This is from theContext
API, called by the wrapper- Parameters:
activeDescriptor
- the descriptor to createroot
- The root descriptor- Returns:
- The object created
-
containsKey
public boolean containsKey(ActiveDescriptor<?> descriptor)
TheContext
API for discovering if a descriptor has been created- Parameters:
descriptor
- The descriptor to find- Returns:
- true if already created, false otherwise
-
destroyOne
public void destroyOne(ActiveDescriptor<?> descriptor)
TheContext
API. Removes a descriptor from the set- Parameters:
descriptor
- The descriptor to destroy
-
proceedTo
public RunLevelFuture proceedTo(int level) throws CurrentlyRunningException
This method is called to change the proceedTo level of the system- Parameters:
level
- The level to change to- Returns:
- A non-null RunLevelFuture that is the handle to give the caller
- Throws:
CurrentlyRunningException
- If there is already a running job
-
getCurrentFuture
public RunLevelFuture getCurrentFuture()
Gets the current task- Returns:
- The current task, may be null if there is no current task
-
-