Uses of Class
com.tnsai.communication.AgentMessage
Packages that use AgentMessage
Package
Description
Agent classes and lifecycle management for the TnsAI framework.
Agent group membership management.
Inter-agent messaging for task delegation, query handling, and protocol communication.
Agent messaging infrastructure for inter-agent communication.
Message transport layer for agent communication.
Protocol callback handlers for annotation-driven message dispatch.
-
Uses of AgentMessage in com.tnsai.agents
Methods in com.tnsai.agents with parameters of type AgentMessageModifier and TypeMethodDescriptionfinal voidAgent.handleCNPMessageHook(AgentMessage message, CNPMessageType type) voidAgent.handleMessage(AgentMessage message) Handles an incoming agent message.final voidAgent.receiveMessage(AgentMessage message) -
Uses of AgentMessage in com.tnsai.agents.groups
Methods in com.tnsai.agents.groups with parameters of type AgentMessageModifier and TypeMethodDescriptionvoidAgentGroup.broadcast(AgentMessage message) Broadcasts a message to all members. -
Uses of AgentMessage in com.tnsai.agents.messaging
Methods in com.tnsai.agents.messaging with parameters of type AgentMessageModifier and TypeMethodDescriptionvoidAgentMessagingHandler.MessagingContext.handleCNPMessageHook(AgentMessage message, CNPMessageType type) Hook for CNP message handling (delegated back to Agent for override support).voidAgentMessagingHandler.processMessage(AgentMessage message) Main entry point for processing received messages. -
Uses of AgentMessage in com.tnsai.communication
Methods in com.tnsai.communication that return AgentMessageModifier and TypeMethodDescriptionAgentCommunicationManager.broadcastMessage(String senderId, MessageTypeMarker messageType, Map<String, Object> content) Broadcasts a message to all agents.static AgentMessageAgentMessage.create(String senderId, String receiverId, MessageTypeMarker messageType, Map<String, Object> content) Creates a new message with auto-generated ID and timestamp.static AgentMessageAgentMessage.createReply(AgentMessage originalMessage, MessageTypeMarker replyType, Map<String, Object> content) Creates a reply to this message (swaps sender and receiver).AcknowledgedMessage.getMessage()Returns the underlying agent message.AgentCommunicationManager.sendMessage(String senderId, String receiverId, MessageTypeMarker messageType, Map<String, Object> content) Sends a message from one agent to another.AcknowledgedMessage.toMessageWithCorrelation()Returns the wrapped message with correlation ID added to metadata.Creates a new message with additional metadata.Methods in com.tnsai.communication that return types with arguments of type AgentMessageModifier and TypeMethodDescriptionAckResult.getAckMessage()Returns the acknowledgment message if available.AgentCommunicationManager.getConversation(String agentId1, String agentId2) Gets the conversation between two agents.AgentCommunicationManager.getMessageHistory(String agentId) Gets all messages involving a specific agent (sent or received).Gets a message thread (original message and all replies).Methods in com.tnsai.communication with parameters of type AgentMessageModifier and TypeMethodDescriptionstatic AckResultAckResult.acknowledged(String correlationId, Instant sentAt, int attempts, AgentMessage ackMessage) Creates a successful acknowledgment result with attempt count.static AckResultAckResult.acknowledged(String correlationId, Instant sentAt, AgentMessage ackMessage) Creates a successful acknowledgment result.static AgentMessageAgentMessage.createReply(AgentMessage originalMessage, MessageTypeMarker replyType, Map<String, Object> content) Creates a reply to this message (swaps sender and receiver).AcknowledgedMessage.Builder.message(AgentMessage message) Sets the message to be acknowledged.static AckResultAckResult.negativeAck(String correlationId, Instant sentAt, String reason, AgentMessage nackMessage) Creates a negative acknowledgment result.static AcknowledgedMessageAcknowledgedMessage.of(AgentMessage message) Creates an AcknowledgedMessage wrapping the given message with default settings.static AcknowledgedMessageAcknowledgedMessage.of(AgentMessage message, Duration timeout) Creates an AcknowledgedMessage with a specific timeout.voidAgentCommunicationManager.MessageReceiver.receiveMessage(AgentMessage message) Constructor parameters in com.tnsai.communication with type arguments of type AgentMessageModifierConstructorDescriptionDefaultMessageAcknowledger(Consumer<AgentMessage> messageSender) Creates a new acknowledger with the given message sender.DefaultMessageAcknowledger(Consumer<AgentMessage> messageSender, String agentId) Creates a new acknowledger with agent ID for tracking. -
Uses of AgentMessage in com.tnsai.communication.transport
Methods in com.tnsai.communication.transport with parameters of type AgentMessageModifier and TypeMethodDescriptionvoidCommunicationTransport.broadcast(AgentMessage message) Broadcasts a message to all subscribed agents (optional support).voidLocalTransport.broadcast(AgentMessage message) voidCommunicationTransport.send(AgentMessage message) Sends a message to a specific receiver.voidLocalTransport.send(AgentMessage message) Method parameters in com.tnsai.communication.transport with type arguments of type AgentMessageModifier and TypeMethodDescriptionvoidCommunicationTransport.register(String agentId, Consumer<AgentMessage> messageHandler) Registers an agent with the transport layer to receive messages.voidLocalTransport.register(String agentId, Consumer<AgentMessage> messageHandler) -
Uses of AgentMessage in com.tnsai.protocols.callbacks
Methods in com.tnsai.protocols.callbacks with parameters of type AgentMessageModifier and TypeMethodDescriptionvoidMessageCallbackDispatcher.dispatchBroadcast(AgentMessage message, String topic) Dispatches a broadcast message to registered callbacks.voidMessageCallbackDispatcher.dispatchMessage(AgentMessage message) Dispatches a direct message to registered callbacks.voidMessageCallbackDispatcher.dispatchPubSub(AgentMessage message, String topic) Dispatches a PubSub message to registered callbacks.voidMessageCallbackDispatcher.dispatchReply(AgentMessage message) Dispatches a reply message to registered callbacks.voidMessageCallbackDispatcher.dispatchRequest(AgentMessage message) Dispatches a request message to registered callbacks.