Package com.tnsai.protocols.annotations
Annotation 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 ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to start server automatically on agent initialization.Remote endpoint URL.Transport mode.
-
Element Details
-
endpoint
String endpointRemote endpoint URL. If empty, uses internal (in-memory) mode. Example: "http://localhost:8080" or "ws://agent.example.com:9090"- Default:
""
-
transport
TransportMode transportTransport mode. AUTO will use INTERNAL if endpoint is empty, HTTP/WEBSOCKET based on endpoint URL scheme.- Default:
AUTO
-
autoStart
boolean autoStartWhether to start server automatically on agent initialization.- Default:
true
-