Interface PortDefinition


@Immutable public interface PortDefinition
Definition of an input or output port on a node. Used to describe the node's interface for client rendering. Port IDs are simple names (e.g., "interval", "message", "bot"). The port type is stored separately in the type() field.
  • Method Details

    • execIn

      static PortDefinition execIn()
      Creates an execution input port.
    • botIn

      static PortDefinition botIn()
      Creates a bot input port (optional). When connected, overrides the bot from execution context.
    • execOut

      static PortDefinition execOut()
      Creates an execution output port.
    • input

      static PortDefinition input(String id, String displayName, PortType type, String description)
      Creates a required input port.
      Parameters:
      id - simple port name (e.g., "interval", "target")
    • inputWithDefault

      static PortDefinition inputWithDefault(String id, String displayName, PortType type, String defaultValue, String description)
      Creates an optional input port with a default value.
      Parameters:
      id - simple port name (e.g., "interval", "message")
    • output

      static PortDefinition output(String id, String displayName, PortType type, String description)
      Creates an output port.
      Parameters:
      id - simple port name (e.g., "success", "count")
    • listInput

      static PortDefinition listInput(String id, String displayName, PortType elementType, String description)
      Creates a list input port with element type.
      Parameters:
      id - simple port name (e.g., "items", "targets")
    • listOutput

      static PortDefinition listOutput(String id, String displayName, PortType elementType, String description)
      Creates a list output port with element type.
      Parameters:
      id - simple port name (e.g., "results", "bots")
    • genericInput

      static PortDefinition genericInput(String id, String displayName, TypeDescriptor typeDescriptor, String description)
      Creates a required input port with a generic type descriptor. The base PortType is derived from the descriptor's baseType().
    • genericOutput

      static PortDefinition genericOutput(String id, String displayName, TypeDescriptor typeDescriptor, String description)
      Creates an output port with a generic type descriptor.
    • genericListInput

      static PortDefinition genericListInput(String id, String displayName, TypeDescriptor elementTypeDescriptor, String description)
      Creates a list input port with a generic element type (e.g., List).
    • genericListOutput

      static PortDefinition genericListOutput(String id, String displayName, TypeDescriptor elementTypeDescriptor, String description)
      Creates a list output port with a generic element type (e.g., List).
    • id

      String id()
    • displayName

      String displayName()
    • type

      PortType type()
    • required

      @Default default boolean required()
    • defaultValue

      @Nullable String defaultValue()
    • description

      String description()
    • elementType

      @Nullable PortType elementType()
    • typeDescriptor

      @Nullable TypeDescriptor typeDescriptor()

      Optional generic type descriptor for parameterized types. When present, provides richer type information than the flat type() field. For example, List is expressed as Parameterized(LIST,

      invalid reference
      Simple(BOT)
      ).

      Type variables like T are resolved based on connections at edit time.

    • effectiveTypeDescriptor

      @Lazy default TypeDescriptor effectiveTypeDescriptor()
      Returns the effective TypeDescriptor for this port. If typeDescriptor() is set, returns it. Otherwise, derives from type() and elementType().
    • multiInput

      @Default default boolean multiInput()
      Whether this input accepts multiple connections (Blender-style multi-input). When true, all connected values are collected into a list. NOTE: The reactive engine does not yet implement multi-input collection.
    • multiInput

      static PortDefinition multiInput(String id, String displayName, PortType type, String description)
      Creates a multi-input port that accepts multiple connections. All connected values are collected into a list.
      Parameters:
      id - simple port name