Interface StatefulService

    • Method Detail

      • getStatus

        ServiceStatus getStatus()
        Returns the current status
        Returns:
        the current status
      • isStarted

        boolean isStarted()
        Whether the service is started
        Returns:
        true if this service has been started
      • isStarting

        boolean isStarting()
        Whether the service is starting
        Returns:
        true if this service is being started
      • isStopping

        boolean isStopping()
        Whether the service is stopping
        Returns:
        true if this service is in the process of stopping
      • isStopped

        boolean isStopped()
        Whether the service is stopped
        Returns:
        true if this service is stopped
      • isSuspending

        boolean isSuspending()
        Whether the service is suspending
        Returns:
        true if this service is in the process of suspending
      • isRunAllowed

        boolean isRunAllowed()
        Helper methods so the service knows if it should keep running. Returns false if the service is being stopped or is stopped.
        Returns:
        true if the service should continue to run.