类 MsgHub.Builder

java.lang.Object
io.agentscope.core.pipeline.MsgHub.Builder
封闭类:
MsgHub

public static class MsgHub.Builder extends Object
Builder for MsgHub.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • name

      public MsgHub.Builder name(String name)
      Set the name of this MsgHub. If not provided, a random UUID will be generated.
      参数:
      name - Hub name
      返回:
      This builder
    • participants

      public MsgHub.Builder participants(AgentBase... participants)
      Set the participants for this MsgHub.
      参数:
      participants - Agents participating in this hub (varargs)
      返回:
      This builder
    • participants

      public MsgHub.Builder participants(List<AgentBase> participants)
      Set the participants for this MsgHub.
      参数:
      participants - List of agents participating in this hub
      返回:
      This builder
    • announcement

      public MsgHub.Builder announcement(Msg... announcement)
      Set announcement messages to broadcast when entering the hub.
      参数:
      announcement - Messages to broadcast on entry (varargs)
      返回:
      This builder
    • announcement

      public MsgHub.Builder announcement(List<Msg> announcement)
      Set announcement messages to broadcast when entering the hub.
      参数:
      announcement - List of messages to broadcast on entry
      返回:
      This builder
    • enableAutoBroadcast

      public MsgHub.Builder enableAutoBroadcast(boolean enable)
      Enable or disable automatic broadcasting. Default is true.
      参数:
      enable - True to enable auto-broadcast, false to disable
      返回:
      This builder
    • build

      public MsgHub build()
      Build the MsgHub instance.
      返回:
      New MsgHub instance
      抛出:
      IllegalArgumentException - if participants list is empty