Package akka.javasdk.agent.autonomous
Record Class MessageAcknowledgement
- Record Components:
messageId- the id set on the message, or the id that the runtime generated, also for a rejected messagestatus- where the message went, or why the agent rejected itduplicate- true when the agent already has a message with this id, because the message is pending or amongAgentState.recentMessages().statusis then the status of that message.
public record MessageAcknowledgement(String messageId, MessageStatus status, boolean duplicate)
extends Record
The reply of an autonomous agent to a message that a client sent with
AutonomousAgentClient.sendMessage(AgentMessage).-
Constructor Summary
ConstructorsConstructorDescriptionMessageAcknowledgement(String messageId, MessageStatus status, boolean duplicate) Creates an instance of aMessageAcknowledgementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theduplicaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themessageIdrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
messageId
Returns the value of themessageIdrecord component.- Returns:
- the value of the
messageIdrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
duplicate
public boolean duplicate()Returns the value of theduplicaterecord component.- Returns:
- the value of the
duplicaterecord component
-