Module org.glassfish.hk2.runlevel
Class AsyncRunLevelContext
java.lang.Object
org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext
- Author:
- jwells
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor) TheContextAPI for discovering if a descriptor has been createdvoiddestroyOne(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor) TheContextAPI.<U> UfindOrCreate(org.glassfish.hk2.api.ActiveDescriptor<U> activeDescriptor, org.glassfish.hk2.api.ServiceHandle<?> root) This is from theContextAPI, called by the wrapperGets the current taskproceedTo(int level) This method is called to change the proceedTo level of the system
-
Method Details
-
findOrCreate
public <U> U findOrCreate(org.glassfish.hk2.api.ActiveDescriptor<U> activeDescriptor, org.glassfish.hk2.api.ServiceHandle<?> root) This is from theContextAPI, called by the wrapper- Parameters:
activeDescriptor- the descriptor to createroot- The root descriptor- Returns:
- The object created
-
containsKey
public boolean containsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor) TheContextAPI 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(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor) TheContextAPI. Removes a descriptor from the set- Parameters:
descriptor- The descriptor to destroy
-
proceedTo
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
Gets the current task- Returns:
- The current task, may be null if there is no current task
-