Class AbstractLifecycle

    • Constructor Detail

      • AbstractLifecycle

        public AbstractLifecycle()
    • Method Detail

      • startup

        public final void startup()
        Call to start this thing up. The first time this is called, onStartup() will be called. Subsequent invocations will throw an IllegalStateException
      • onStartup

        protected abstract void onStartup()
      • shutdown

        public final void shutdown()
        Call to shut this thing down. Must have called startup first for this to have an effect.
      • onShutdown

        protected abstract void onShutdown()
      • isRunning

        public boolean isRunning()
        Returns:
        true after startup() is called and before shutdown() is called.