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 Summary
Modifier and TypeMethodDescriptionstatic PortDefinitionbotIn()Creates a bot input port (optional).@Nullable Stringdefault TypeDescriptorReturns the effective TypeDescriptor for this port.@Nullable PortTypestatic PortDefinitionexecIn()Creates an execution input port.static PortDefinitionexecOut()Creates an execution output port.static PortDefinitiongenericInput(String id, String displayName, TypeDescriptor typeDescriptor, String description) Creates a required input port with a generic type descriptor.static PortDefinitiongenericListInput(String id, String displayName, TypeDescriptor elementTypeDescriptor, String description) Creates a list input port with a generic element type (e.g., List). static PortDefinitiongenericListOutput(String id, String displayName, TypeDescriptor elementTypeDescriptor, String description) Creates a list output port with a generic element type (e.g., List). static PortDefinitiongenericOutput(String id, String displayName, TypeDescriptor typeDescriptor, String description) Creates an output port with a generic type descriptor.id()static PortDefinitionCreates a required input port.static PortDefinitioninputWithDefault(String id, String displayName, PortType type, String defaultValue, String description) Creates an optional input port with a default value.static PortDefinitionCreates a list input port with element type.static PortDefinitionlistOutput(String id, String displayName, PortType elementType, String description) Creates a list output port with element type.default booleanWhether this input accepts multiple connections (Blender-style multi-input).static PortDefinitionmultiInput(String id, String displayName, PortType type, String description) Creates a multi-input port that accepts multiple connections.static PortDefinitionCreates an output port.default booleanrequired()type()@Nullable TypeDescriptorOptional generic type descriptor for parameterized types.
-
Method Details
-
execIn
Creates an execution input port. -
botIn
Creates a bot input port (optional). When connected, overrides the bot from execution context. -
execOut
Creates an execution output port. -
input
Creates a required input port.- Parameters:
id- simple port name (e.g., "interval", "target")
-
inputWithDefault
-
output
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
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
Creates a multi-input port that accepts multiple connections. All connected values are collected into a list.- Parameters:
id- simple port name
-