Interface ConditionalNG

All Superinterfaces:
Base, Comparable<NamedBean>, NamedBean, PropertyChangeProvider
All Known Implementing Classes:
DefaultConditionalNG

public interface ConditionalNG
extends Base, NamedBean
ConditionalNG.
  • Method Details

    • getCurrentThread

      Get the thread that this conditionalNG executes on.
      Returns:
      the thread
    • 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
    • getFemaleSocket

      Get the female socket of this ConditionalNG.
      Returns:
      the female socket
    • 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
    • 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
    • execute

      Execute the female socket.
      Parameters:
      socket - the female socket
    • getStack

      Get the stack
      Returns:
      the stack
    • getSymbolTable

      Get the current symbol table
      Returns:
      the symbol table
    • setSymbolTable

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