Interface ConditionalNG

    • Method Detail

      • getStartupThreadId

        int getStartupThreadId()
        Get the thread id that this conditionalNG should execute on when JMRI starts next time. It's not currently possible to move a ConditionalNG from one thread to another without restarting JMRI.
        Returns:
        the thread ID
      • setStartupThreadId

        void setStartupThreadId​(int threadId)
        Set the thread id that this conditionalNG should execute on when JMRI starts next time. It's not currently possible to move a ConditionalNG from one thread to another without restarting JMRI.
        Parameters:
        threadId - the thread ID
      • setEnabled

        void setEnabled​(boolean enable)
        Set whenether this ConditionalNG is enabled or disabled.

        This method must call registerListeners() / unregisterListeners().

        Parameters:
        enable - true if this ConditionalNG should be enabled, false otherwise
      • isEnabled

        boolean isEnabled()
        Determines whether this ConditionalNG is enabled.
        Specified by:
        isEnabled in interface Base
        Returns:
        true if the ConditionalNG is enabled, false otherwise
      • setExecuteAtStartup

        void setExecuteAtStartup​(boolean value)
        Set whenether this ConditionalNG should be executed at startup or at panel load.
        Parameters:
        value - true if this ConditionalNG should be executed at startup or at panel load.
      • isExecuteAtStartup

        boolean isExecuteAtStartup()
        Determines whenether this ConditionalNG should be executed at startup or at panel load.
        Returns:
        true if this ConditionalNG should be executed at startup or at panel load.
      • setRunDelayed

        void setRunDelayed​(boolean value)
        Set whenether execute() should run on the LogixNG thread at once or should dispatch the call until later. Most tests turns off the delay to simplify the tests.
        Parameters:
        value - true if execute() should run on LogixNG thread delayed, false otherwise.
      • getRunDelayed

        boolean getRunDelayed()
        Get whenether execute() should run on the LogixNG thread at once or should dispatch the call until later. Most tests turns off the delay to simplify the tests.
        Returns:
        true if execute() should run on LogixNG thread delayed, false otherwise.
      • execute

        void execute()
        Execute the ConditionalNG.
      • execute

        void execute​(boolean allowRunDelayed)
        Execute the ConditionalNG.
        Parameters:
        allowRunDelayed - true if it's ok to run delayed, false otherwise
      • isListenersRegistered

        boolean isListenersRegistered()
        Are listeners registered?
        Returns:
        true if listeners are registered, otherwise return false
      • setSymbolTable

        void setSymbolTable​(SymbolTable symbolTable)
        Set the current symbol table
        Parameters:
        symbolTable - the symbol table