Record Class ChoreographySpec.Interaction

java.lang.Object
java.lang.Record
com.tnsai.coordination.choreography.ChoreographySpec.Interaction
Record Components:
id - unique interaction identifier
sourceAgent - agent that triggers this interaction
targetAgent - agent that executes the task
triggerEvent - event that triggers this interaction
emitEvent - 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 Details

    • Interaction

      public Interaction(String id, String sourceAgent, String targetAgent, String triggerEvent, String emitEvent, String taskDescription)
      Creates an instance of a Interaction record class.
      Parameters:
      id - the value for the id record component
      sourceAgent - the value for the sourceAgent record component
      targetAgent - the value for the targetAgent record component
      triggerEvent - the value for the triggerEvent record component
      emitEvent - the value for the emitEvent record component
      taskDescription - the value for the taskDescription record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • sourceAgent

      public String sourceAgent()
      Returns the value of the sourceAgent record component.
      Returns:
      the value of the sourceAgent record component
    • targetAgent

      public String targetAgent()
      Returns the value of the targetAgent record component.
      Returns:
      the value of the targetAgent record component
    • triggerEvent

      public String triggerEvent()
      Returns the value of the triggerEvent record component.
      Returns:
      the value of the triggerEvent record component
    • emitEvent

      public String emitEvent()
      Returns the value of the emitEvent record component.
      Returns:
      the value of the emitEvent record component
    • taskDescription

      public String taskDescription()
      Returns the value of the taskDescription record component.
      Returns:
      the value of the taskDescription record component