Class AsyncRunLevelContext

java.lang.Object
org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext

@Service @Visibility(LOCAL) public class AsyncRunLevelContext extends Object
Author:
jwells
  • Method Details

    • findOrCreate

      public <U> U findOrCreate(org.glassfish.hk2.api.ActiveDescriptor<U> activeDescriptor, org.glassfish.hk2.api.ServiceHandle<?> root)
      This is from the Context API, called by the wrapper
      Parameters:
      activeDescriptor - the descriptor to create
      root - The root descriptor
      Returns:
      The object created
    • containsKey

      public boolean containsKey(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
      The Context 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(org.glassfish.hk2.api.ActiveDescriptor<?> descriptor)
      The Context 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