Record Class PublishStepDefinition
java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.dsl.api.PublishStepDefinition
- Record Components:
stepName- logical step name recorded with the published eventevent- event to publish
Specification for a
ctx.publish(stepName, event) call.
Unlike the other step definitions this one carries no PrimitiveMetadata: the published event keeps its own
MessageType, so there is no event name to customize. Only the step name is
needed.
- Since:
- 5.4.0
- Author:
- Stefan Dragisic
-
Constructor Summary
ConstructorsConstructorDescriptionPublishStepDefinition(String stepName, EventMessage event) Fails fast when a mandatory component isnull; the package's null-marked contract alone is not enforced at runtime, so a user ignoring it is detected here at construction. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.event(EventMessage event) Returns a copy of this definition with the provided event.final inthashCode()Returns a hash code value for this object.stepName()Returns the value of thestepNamerecord component.Returns a copy of this definition with the provided step name.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PublishStepDefinition
Fails fast when a mandatory component isnull; the package's null-marked contract alone is not enforced at runtime, so a user ignoring it is detected here at construction.
-
-
Method Details
-
stepName
Returns a copy of this definition with the provided step name.- Parameters:
stepName- logical step name- Returns:
- copied definition
-
event
Returns a copy of this definition with the provided event.- Parameters:
event- event to publish- Returns:
- copied definition
-
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). -
stepName
Returns the value of thestepNamerecord component.- Returns:
- the value of the
stepNamerecord component
-
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-