Interface ComponentState

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    ClosedState, ComponentStateImp, InitialisedState, StartedState, StoppedState

    public interface ComponentState
    extends java.io.Serializable

    Defines the state transition requests that can be made to a StateManagedComponent. Concrete implementations represent an actual state and permitted transitions from that state.

    • Method Detail

      • requestInit

        void requestInit​(StateManagedComponent comp)
                  throws CoreException

        Perform operations required to move comp from this state to InitialisedState, if possible.

        Parameters:
        comp - the StateManagedComponent to manipulate
        Throws:
        CoreException - wrapping any underlying exceptions
      • requestStart

        void requestStart​(StateManagedComponent comp)
                   throws CoreException

        Perform operations required to move comp from this state to StartedState, if possible.

        Parameters:
        comp - the StateManagedComponent to manipulate
        Throws:
        CoreException - wrapping any underlying exceptions
      • requestStop

        void requestStop​(StateManagedComponent comp)

        Perform operations required to move comp from this state to StoppedState, if possible.

        Parameters:
        comp - the StateManagedComponent to manipulate
      • requestClose

        void requestClose​(StateManagedComponent comp)

        Perform operations required to move comp from this state to ClosedState, if possible.

        Parameters:
        comp - the StateManagedComponent to manipulate
      • requestRestart

        void requestRestart​(StateManagedComponent comp)
                     throws CoreException

        Perform operations required to restart the comp. Differs from start in that underlying components which are in the StartedState will be stopped, closed, inited and started.

        Parameters:
        comp - the StateManagedComponent to manipulate
        Throws:
        CoreException - wrapping any underlying exceptions