Interface LifeCycle

    • Method Detail

      • stop

        @ManagedOperation(value="Stops the instance",
                          impact="ACTION")
        void stop()
           throws java.lang.Exception
        Stops the component. The component may wait for current activities to complete normally, but it can be interrupted.
        Throws:
        java.lang.Exception - If the component fails to stop
        See Also:
        isStopped(), start(), isFailed()
      • isRunning

        boolean isRunning()
        Returns:
        true if the component is starting or has been started.
      • isStarted

        boolean isStarted()
        Returns:
        true if the component has been started.
        See Also:
        start(), isStarting()
      • isStarting

        boolean isStarting()
        Returns:
        true if the component is starting.
        See Also:
        isStarted()
      • isStopping

        boolean isStopping()
        Returns:
        true if the component is stopping.
        See Also:
        isStopped()
      • isStopped

        boolean isStopped()
        Returns:
        true if the component has been stopped.
        See Also:
        stop(), isStopping()
      • isFailed

        boolean isFailed()
        Returns:
        true if the component has failed to start or has failed to stop.
      • start

        static void start​(java.lang.Object object)
        Utility to start an object if it is a LifeCycle and to convert any exception thrown to a RuntimeException
        Parameters:
        object - The instance to start.
        Throws:
        java.lang.RuntimeException - if the call to start throws an exception.
      • stop

        static void stop​(java.lang.Object object)
        Utility to stop an object if it is a LifeCycle and to convert any exception thrown to a RuntimeException
        Parameters:
        object - The instance to stop.
        Throws:
        java.lang.RuntimeException - if the call to stop throws an exception.