Record Class ChoreographySpec.Interaction
java.lang.Object
java.lang.Record
com.tnsai.coordination.choreography.ChoreographySpec.Interaction
- Record Components:
id- unique interaction identifiersourceAgent- agent that triggers this interactiontargetAgent- agent that executes the tasktriggerEvent- event that triggers this interactionemitEvent- event emitted after completion (nullable)taskDescription- task description sent to the target agent
- Enclosing class:
ChoreographySpec
public static record ChoreographySpec.Interaction(String id, String sourceAgent, String targetAgent, String triggerEvent, String emitEvent, String taskDescription)
extends Record
A single interaction rule in the choreography.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theemitEventrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thesourceAgentrecord component.Returns the value of thetargetAgentrecord component.Returns the value of thetaskDescriptionrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetriggerEventrecord component.
-
Constructor Details
-
Interaction
public Interaction(String id, String sourceAgent, String targetAgent, String triggerEvent, String emitEvent, String taskDescription) Creates an instance of aInteractionrecord class.- Parameters:
id- the value for theidrecord componentsourceAgent- the value for thesourceAgentrecord componenttargetAgent- the value for thetargetAgentrecord componenttriggerEvent- the value for thetriggerEventrecord componentemitEvent- the value for theemitEventrecord componenttaskDescription- the value for thetaskDescriptionrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
sourceAgent
Returns the value of thesourceAgentrecord component.- Returns:
- the value of the
sourceAgentrecord component
-
targetAgent
Returns the value of thetargetAgentrecord component.- Returns:
- the value of the
targetAgentrecord component
-
triggerEvent
Returns the value of thetriggerEventrecord component.- Returns:
- the value of the
triggerEventrecord component
-
emitEvent
Returns the value of theemitEventrecord component.- Returns:
- the value of the
emitEventrecord component
-
taskDescription
Returns the value of thetaskDescriptionrecord component.- Returns:
- the value of the
taskDescriptionrecord component
-