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

public interface MaleSocket extends Debugable
A LogixNG male socket.
  • Method Details

    • setEnabled

      void setEnabled(boolean enable)
      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

      void setEnabledFlag(boolean enable)
      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.
      Specified by:
      isEnabled in interface Base
      Returns:
      true if the male socket is enabled, false otherwise
    • getListen

      boolean getListen()
      Get whenether the node should listen to changes or not.
      Returns:
      true if listen, false if not listen
    • setListen

      void setListen(boolean listen)
      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

      void setLocked(boolean locked)
      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

      void setSystem(boolean system)
      Set if the node is system or not.
      Parameters:
      system - true if system, false otherwise
    • getCatchAbortExecution

      Is the node catching AbortExecution or not?
      Returns:
      true if catching, false otherwise
    • setCatchAbortExecution

      void setCatchAbortExecution(boolean catchAbortExecution)
      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

    • getLocalVariables

    • isSupportingLocalVariables

      default boolean 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 error
      message - the error message
      e - the exception that has happened
      log - 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 error
      message - the error message
      messageList - a list of error messages
      e - the exception that has happened
      log - 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 error
      message - the error message
      e - the exception that has happened
      log - 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

      Get the manager that stores this socket. This method is used when the object is going to be configured.
      Returns:
      the manager
    • setup

      default void setup()
      Setup this object and its children. This method is used to lookup system names for child sockets, turnouts, sensors, and so on.
      Specified by:
      setup in interface Base
    • find

      default MaleSocket find(Class<?> clazz)
      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