Package jmri.jmrit.logixng
Interface MaleSocket
- All Superinterfaces:
Base,Debugable,PropertyChangeProvider
- All Known Subinterfaces:
MaleAnalogActionSocket,MaleAnalogExpressionSocket,MaleDigitalActionSocket,MaleDigitalBooleanActionSocket,MaleDigitalExpressionSocket,MaleStringActionSocket,MaleStringExpressionSocket
- All Known Implementing Classes:
AbstractDebuggerMaleSocket,AbstractMaleSocket,DebuggerMaleAnalogActionSocket,DebuggerMaleAnalogExpressionSocket,DebuggerMaleDigitalActionSocket,DebuggerMaleDigitalBooleanActionSocket,DebuggerMaleDigitalExpressionSocket,DebuggerMaleStringActionSocket,DebuggerMaleStringExpressionSocket,DefaultMaleAnalogActionSocket,DefaultMaleAnalogExpressionSocket,DefaultMaleDigitalActionSocket,DefaultMaleDigitalBooleanActionSocket,DefaultMaleDigitalExpressionSocket,DefaultMaleStringActionSocket,DefaultMaleStringExpressionSocket,ModuleEditorMaleSocket
A LogixNG male socket.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowExceptionNested classes/interfaces inherited from interface jmri.jmrit.logixng.Debugable
Debugable.DebugConfig -
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocalVariable(String name, SymbolTable.InitialValueType initialValueType, String initialValueData) voidaddLocalVariable(SymbolTable.VariableData variableData) voiddefault MaleSocketFind a male socket of a particular type.booleanIs the node catching AbortExecution or not?Get the error handling type for this socket.booleanGet whenether the node should listen to changes or not.BaseManager<? extends NamedBean>Get the manager that stores this socket.Get the object that this male socket holds.voidhandleError(Base item, String message, RuntimeException e, org.slf4j.Logger log) Handle an error that has happened during execution or evaluation of this item.voidhandleError(Base item, String message, List<String> messageList, JmriException e, org.slf4j.Logger log) Handle an error that has happened during execution or evaluation of this item.voidhandleError(Base item, String message, JmriException e, org.slf4j.Logger log) Handle an error that has happened during execution or evaluation of this item.booleanDetermines whether this male socket is enabled.booleanisLocked()Is the node locked?default booleanbooleanisSystem()Is the node a system node?voidsetCatchAbortExecution(boolean catchAbortExecution) Set if the node should catch AbortExecution or not.voidsetEnabled(boolean enable) Set whenether this male socket is enabled or disabled.voidsetEnabledFlag(boolean enable) Set whenether this male socket is enabled or disabled, without activating the male socket.voidsetErrorHandlingType(MaleSocket.ErrorHandlingType errorHandlingType) Set the error handling type for this socket.voidsetListen(boolean listen) Set whenether the node should listen to changes or not.voidsetLocked(boolean locked) Set if the node is locked or not.voidsetSystem(boolean system) Set if the node is system or not.default voidsetup()Setup this object and its children.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, setUserName, unregisterListeners, updateListenerRef, vetoableChangeMethods inherited from interface jmri.jmrit.logixng.Debugable
createDebugConfig, getDebugConfig, setDebugConfigMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Method Details
-
setEnabled
Set whenether this male socket is enabled or disabled.This method must call registerListeners() / unregisterListeners().
- Parameters:
enable- true if this male socket should be enabled, false otherwise
-
setEnabledFlag
Set whenether this male socket is enabled or disabled, without activating the male socket. This is used when loading the xml file and when copying an item.This method must call registerListeners() / unregisterListeners().
- Parameters:
enable- true if this male socket should be enabled, false otherwise
-
isEnabled
boolean isEnabled()Determines whether this male socket is enabled. -
getListen
boolean getListen()Get whenether the node should listen to changes or not.- Returns:
- true if listen, false if not listen
-
setListen
Set whenether the node should listen to changes or not.- Parameters:
listen- true if listen, false if not listen
-
isLocked
boolean isLocked()Is the node locked?- Returns:
- true if locked, false otherwise
-
setLocked
Set if the node is locked or not.- Parameters:
locked- true if locked, false otherwise
-
isSystem
boolean isSystem()Is the node a system node?- Returns:
- true if system, false otherwise
-
setSystem
Set if the node is system or not.- Parameters:
system- true if system, false otherwise
-
getCatchAbortExecution
boolean getCatchAbortExecution()Is the node catching AbortExecution or not?- Returns:
- true if catching, false otherwise
-
setCatchAbortExecution
Set if the node should catch AbortExecution or not.- Parameters:
catchAbortExecution- true if catch, false otherwise
-
addLocalVariable
void addLocalVariable(String name, SymbolTable.InitialValueType initialValueType, String initialValueData) -
addLocalVariable
-
clearLocalVariables
void clearLocalVariables() -
getLocalVariables
-
isSupportingLocalVariables
-
getErrorHandlingType
Get the error handling type for this socket.- Returns:
- the error handling type
-
setErrorHandlingType
Set the error handling type for this socket.- Parameters:
errorHandlingType- the error handling type
-
handleError
void handleError(Base item, String message, JmriException e, org.slf4j.Logger log) throws JmriException Handle an error that has happened during execution or evaluation of this item.- Parameters:
item- the item that had the errormessage- the error messagee- the exception that has happenedlog- the logger- Throws:
JmriException- if the male socket is configured to throw an exception
-
handleError
void handleError(Base item, String message, List<String> messageList, JmriException e, org.slf4j.Logger log) throws JmriException Handle an error that has happened during execution or evaluation of this item.- Parameters:
item- the item that had the errormessage- the error messagemessageList- a list of error messagese- the exception that has happenedlog- the logger- Throws:
JmriException- if the male socket is configured to throw an exception
-
handleError
void handleError(Base item, String message, RuntimeException e, org.slf4j.Logger log) throws JmriException Handle an error that has happened during execution or evaluation of this item.- Parameters:
item- the item that had the errormessage- the error messagee- the exception that has happenedlog- the logger- Throws:
JmriException- if the male socket is configured to throw an exception
-
getObject
Get the object that this male socket holds. This method is used when the object is going to be configured.- Returns:
- the object this male socket holds
-
getManager
BaseManager<? extends NamedBean> getManager()Get the manager that stores this socket. This method is used when the object is going to be configured.- Returns:
- the manager
-
setup
Setup this object and its children. This method is used to lookup system names for child sockets, turnouts, sensors, and so on. -
find
Find a male socket of a particular type. Male sockets can be stacked and this method travels thru the stacked male sockets to find the desired male socket.- Parameters:
clazz- the type of the male socket we are looking for- Returns:
- the found male socket or null if not found
-