Annotation Interface DirectMessage


@Retention(RUNTIME) @Target(TYPE) public @interface DirectMessage
Enables direct point-to-point messaging for an Agent or Role.

Internal Mode (no endpoint):

 @DirectMessage
 public class MyAgent extends Agent {
     // In-memory communication only
 }
 

Remote Mode (with endpoint):

 @DirectMessage(endpoint = "http://localhost:8080")
 public class RemoteAgent extends Agent {
     // HTTP server starts at port 8080
 }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to start server automatically on agent initialization.
    Remote endpoint URL.
    Transport mode.
  • Element Details

    • endpoint

      String endpoint
      Remote endpoint URL. If empty, uses internal (in-memory) mode. Example: "http://localhost:8080" or "ws://agent.example.com:9090"
      Default:
      ""
    • transport

      TransportMode transport
      Transport mode. AUTO will use INTERNAL if endpoint is empty, HTTP/WEBSOCKET based on endpoint URL scheme.
      Default:
      AUTO
    • autoStart

      boolean autoStart
      Whether to start server automatically on agent initialization.
      Default:
      true