Interface FemaleSocket

All Superinterfaces:
Base, PropertyChangeProvider
All Known Subinterfaces:
FemaleAnalogActionSocket, FemaleAnalogExpressionSocket, FemaleAnySocket, FemaleDigitalActionSocket, FemaleDigitalBooleanActionSocket, FemaleDigitalExpressionSocket, FemaleGenericExpressionSocket, FemaleStringActionSocket, FemaleStringExpressionSocket
All Known Implementing Classes:
AbstractFemaleSocket, DefaultFemaleAnalogActionSocket, DefaultFemaleAnalogExpressionSocket, DefaultFemaleAnySocket, DefaultFemaleDigitalActionSocket, DefaultFemaleDigitalBooleanActionSocket, DefaultFemaleDigitalExpressionSocket, DefaultFemaleGenericExpressionSocket, DefaultFemaleStringActionSocket, DefaultFemaleStringExpressionSocket

public interface FemaleSocket
extends Base
A LogixNG female expression socket. A Expression or a Action that has children must not use these directly but instead use a FemaleSocket.
  • Method Details

    • connect

      Connect the male socket to this female socket.
      Parameters:
      socket - the socket to connect
      Throws:
      SocketAlreadyConnectedException - if the socket is already connected
    • disconnect

      void disconnect()
      Disconnect the current connected male socket from this female socket.
    • canDisconnect

      default boolean canDisconnect()
      Can a connected socket be disconnected?
      Returns:
      true if the socket can be disconnected, false otherwise
    • getConnectedSocket

      Get the connected socket.
      Returns:
      the male socket or null if not connected
    • isConnected

      boolean isConnected()
      Is a male socket connected to this female socket?
      Returns:
      true if connected
    • isCompatible

      boolean isCompatible​(MaleSocket socket)
      Is a particular male socket compatible with this female socket?
      Parameters:
      socket - the male socket
      Returns:
      true if the male socket can be connected to this female socket
    • validateName

      default boolean validateName​(String name)
      Validates a name for a FemaleSocket.

      The name must have at least one character and only alphanumeric characters. The first character must not be a digit.

      Parameters:
      name - the name
      Returns:
      true if the name is valid, false otherwise
    • validateName

      boolean validateName​(String name, boolean ignoreDuplicateErrors)
      Validates a name for a FemaleSocket.

      The name must have at least one character and only alphanumeric characters. The first character must not be a digit.

      Parameters:
      name - the name
      ignoreDuplicateErrors - true if duplicate names should be ignored, false otherwise
      Returns:
      true if the name is valid, false otherwise
    • setName

      default void setName​(String name)
      Set the name of this socket.

      The name must have at least one character and only alphanumeric characters. The first character must not be a digit.

      Parameters:
      name - the name
    • setName

      void setName​(String name, boolean ignoreDuplicateErrors)
      Set the name of this socket.

      The name must have at least one character and only alphanumeric characters. The first character must not be a digit.

      Parameters:
      name - the name
      ignoreDuplicateErrors - true if duplicate names should be ignored, false otherwise
    • getName

      Get the name of this socket.
      Returns:
      the name
    • isSocketOperationAllowed

      Is the operation allowed on this socket?
      Parameters:
      oper - the operation to do
      Returns:
      true if operation is allowed, false otherwise
    • doSocketOperation

      default void doSocketOperation​(FemaleSocketOperation oper)
      Do an operation on this socket
      Parameters:
      oper - the operation to do
    • setEnableListeners

      void setEnableListeners​(boolean enable)
      Sets whenever listeners are enabled or not. ConditionalNG has always listeners enabled, but Clipboard and Module has never listeners enabled.
      Parameters:
      enable - true if listeners should be enabled, false otherwise
    • getEnableListeners

      Gets whenever listeners are enabled or not. ConditionalNG has always listeners enabled, but Clipboard and Module has never listeners enabled.
      Returns:
      true if listeners should be enabled, false otherwise
    • isAncestor

      default boolean isAncestor​(MaleSocket maleSocket)
      Am I an ancestor to this maleSocket?
      Parameters:
      maleSocket - the maleSocket that could be a child
      Returns:
      true if this oject is an ancestor to the maleSocket object
    • getConnectableClasses

      Get a set of classes that are compatible with this female socket.
      Returns:
      a set of entries with category and class
    • 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