Package jmri.jmrit.logixng
Interface ConditionalNG
-
- All Superinterfaces:
Base
,java.lang.Comparable<NamedBean>
,NamedBean
,PropertyChangeProvider
- All Known Implementing Classes:
DefaultConditionalNG
public interface ConditionalNG extends Base, NamedBean
ConditionalNG.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowException
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
Fields inherited from interface jmri.jmrit.logixng.Base
PRINT_LINE_NUMBERS_FORMAT, PROPERTY_CHILD_COUNT, PROPERTY_CHILD_REORDER, PROPERTY_LAST_RESULT_CHANGED, PROPERTY_SOCKET_CONNECTED, PROPERTY_SOCKET_DISCONNECTED, SEPARATOR, SOCKET_CONNECTED, SOCKET_DISCONNECTED
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute()
Execute the ConditionalNG.void
execute(boolean allowRunDelayed)
Execute the ConditionalNG.void
execute(FemaleDigitalActionSocket socket)
Execute the female socket.LogixNG_Thread
getCurrentThread()
Get the thread that this conditionalNG executes on.FemaleDigitalActionSocket
getFemaleSocket()
Get the female socket of this ConditionalNG.boolean
getRunDelayed()
Get whenether execute() should run on the LogixNG thread at once or should dispatch the call until later.java.lang.String
getSocketSystemName()
Stack
getStack()
Get the stackint
getStartupThreadId()
Get the thread id that this conditionalNG should execute on when JMRI starts next time.SymbolTable
getSymbolTable()
Get the current symbol tableboolean
isEnabled()
Determines whether this ConditionalNG is enabled.boolean
isExecuteAtStartup()
Determines whenether this ConditionalNG should be executed at startup or at panel load.boolean
isListenersRegistered()
Are listeners registered?void
setCurrentConditionalNG(ConditionalNG conditionalNG)
Set the current ConditionalNG.void
setEnabled(boolean enable)
Set whenether this ConditionalNG is enabled or disabled.void
setExecuteAtStartup(boolean value)
Set whenether this ConditionalNG should be executed at startup or at panel load.void
setRunDelayed(boolean value)
Set whenether execute() should run on the LogixNG thread at once or should dispatch the call until later.void
setSocketSystemName(java.lang.String systemName)
void
setStartupThreadId(int threadId)
Set the thread id that this conditionalNG should execute on when JMRI starts next time.void
setSymbolTable(SymbolTable symbolTable)
Set the current symbol table-
Methods inherited from interface jmri.jmrit.logixng.Base
addPropertyChangeListener, addPropertyChangeListener, deepCopyChildren, dispose, doSocketOperation, existsInTree, forEntireTree, forEntireTreeWithException, getCategory, getChild, getChildCount, getComment, getConditionalNG, getDeepCopy, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLogixNG, getLongDescription, getLongDescription, getModule, getNumPropertyChangeListeners, getParent, getPropertyChangeListenersByReference, getRoot, getShortDescription, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, isSocketOperationAllowed, printTree, printTree, printTree, printTree, printTree, registerListeners, setComment, setParent, setParentForAllChildren, setup, setUserName, unregisterListeners, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Method Detail
-
getCurrentThread
LogixNG_Thread getCurrentThread()
Get the thread that this conditionalNG executes on.- Returns:
- the thread
-
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
-
getFemaleSocket
FemaleDigitalActionSocket getFemaleSocket()
Get the female socket of this ConditionalNG.- Returns:
- the female socket
-
setSocketSystemName
void setSocketSystemName(java.lang.String systemName)
-
getSocketSystemName
java.lang.String getSocketSystemName()
-
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.
-
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
-
execute
void execute(FemaleDigitalActionSocket socket)
Execute the female socket.- Parameters:
socket
- the female socket
-
isListenersRegistered
boolean isListenersRegistered()
Are listeners registered?- Returns:
- true if listeners are registered, otherwise return false
-
getSymbolTable
SymbolTable 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
-
setCurrentConditionalNG
void setCurrentConditionalNG(ConditionalNG conditionalNG)
Set the current ConditionalNG.- Parameters:
conditionalNG
- the current ConditionalNG
-
-