Class AsyncRunLevelContext

    • Method Detail

      • findOrCreate

        public <U> U findOrCreate​(ActiveDescriptor<U> activeDescriptor,
                                  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​(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​(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