Class ScheduledDeadlineInfo

java.lang.Object
org.axonframework.test.deadline.ScheduledDeadlineInfo
All Implemented Interfaces:
Comparable<ScheduledDeadlineInfo>

public class ScheduledDeadlineInfo extends Object implements Comparable<ScheduledDeadlineInfo>
Holds the data regarding deadline schedule.
Since:
3.3
Author:
Milan Savic, Steven van Beelen
  • Constructor Details

    • ScheduledDeadlineInfo

      public ScheduledDeadlineInfo(Instant scheduleTime, String deadlineName, String scheduleId, int counter, DeadlineMessage<?> deadlineMessage, ScopeDescriptor deadlineScope)
      Instantiates a ScheduledDeadlineInfo.
      Parameters:
      scheduleTime - The time as an Instant at which the deadline is scheduled
      deadlineName - A String denoting the name of the deadline; can be used together with the scheduleId to cancel the deadline
      scheduleId - A String identifier representing the scheduled deadline; can be used together with the deadlineName to cancel the deadline
      counter - Used to differentiate two deadlines scheduled at the same time
      deadlineMessage - The deadline message of the scheduled deadline.
      deadlineScope - A description of the Scope in which the deadline is scheduled
  • Method Details

    • recreateWithNewMessage

      public ScheduledDeadlineInfo recreateWithNewMessage(DeadlineMessage<?> deadlineMessage)
      Creates a new instance of scheduled deadline info with new deadlineMessage. Other fields are the same.
      Parameters:
      deadlineMessage - New deadline message
      Returns:
      new instance with given deadlineMessage
    • getScheduleTime

      public Instant getScheduleTime()
      Retrieve the time as an Instant at which the deadline is scheduled.
      Returns:
      the time as an Instant at which the deadline is scheduled
    • getDeadlineName

      public String getDeadlineName()
      Retrieve a String denoting the name of the deadline; can be used together with the scheduleId to cancel the deadline.
      Returns:
      a String denoting the name of the deadline; can be used together with the scheduleId to cancel the deadline
    • getScheduleId

      public String getScheduleId()
      Retrieve a String identifier representing the scheduled deadline; can be used together with the deadlineName to cancel the deadline.
      Returns:
      a String identifier representing the scheduled deadline; can be used together with the deadlineName to cancel the deadline
    • getCounter

      public int getCounter()
      Retrieve the counter used to differentiate two deadlines scheduled at the same time.
      Returns:
      the counter used to differentiate two deadlines scheduled at the same time
    • getDeadlineScope

      public ScopeDescriptor getDeadlineScope()
      Retrieve a description of the Scope in which the deadline is scheduled.
      Returns:
      a description of the Scope in which the deadline is scheduled
    • deadlineMessage

      public DeadlineMessage<?> deadlineMessage()
      Retrieve a DeadlineMessage constructed out of the deadlineName and deadlineInfo.
      Returns:
      a DeadlineMessage constructed out of the deadlineName and deadlineInfo
    • compareTo

      public int compareTo(ScheduledDeadlineInfo other)
      Specified by:
      compareTo in interface Comparable<ScheduledDeadlineInfo>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object