Class State

    • Field Detail

      • state

        protected int state
    • Constructor Detail

      • State

        public State​(int initialState)
        Creates a new State object.
        Parameters:
        initialState -
    • Method Detail

      • isValidState

        public abstract boolean isValidState​(int state)
        Parameters:
        state -
        Returns:
      • getValue

        public int getValue()
        Returns:
      • breakWaiting

        public void breakWaiting()
      • waitForState

        public boolean waitForState​(int state)
                             throws InvalidStateException,
                                    java.lang.InterruptedException
        Parameters:
        state -
        Returns:
        Throws:
        InvalidStateException
        java.lang.InterruptedException
      • waitForState

        public boolean waitForState​(int state,
                                    long timeout)
                             throws InvalidStateException,
                                    java.lang.InterruptedException
        Parameters:
        state -
        timeout -
        Returns:
        Throws:
        InvalidStateException
        java.lang.InterruptedException
      • waitForStateUpdate

        public int waitForStateUpdate()
                               throws java.lang.InterruptedException
        Returns:
        Throws:
        java.lang.InterruptedException