Class DeadlineJob.DeadlineJobDataBinder

java.lang.Object
org.axonframework.deadline.quartz.DeadlineJob.DeadlineJobDataBinder
Enclosing class:
DeadlineJob

public static class DeadlineJob.DeadlineJobDataBinder extends Object
This binder is used to map deadline message and deadline scopes to the job data and vice versa.
  • Field Details

    • SERIALIZED_DEADLINE_MESSAGE

      @Deprecated public static final String SERIALIZED_DEADLINE_MESSAGE
      Deprecated.
      in favor of the separate DeadlineMessage keys | only maintained for backwards compatibility
      Key pointing to the serialized DeadlineMessage.
      See Also:
    • SERIALIZED_DEADLINE_MESSAGE_CLASS_NAME

      @Deprecated public static final String SERIALIZED_DEADLINE_MESSAGE_CLASS_NAME
      Deprecated.
      in favor of the separate DeadlineMessage keys | only maintained for backwards compatibility
      Key pointing to the class name of the serialized DeadlineMessage.
      See Also:
    • SERIALIZED_DEADLINE_SCOPE

      public static final String SERIALIZED_DEADLINE_SCOPE
      Key pointing to the serialized deadline ScopeDescriptor in the JobDataMap
      See Also:
    • SERIALIZED_DEADLINE_SCOPE_CLASS_NAME

      public static final String SERIALIZED_DEADLINE_SCOPE_CLASS_NAME
      Key pointing to the class name of the deadline ScopeDescriptor in the JobDataMap
      See Also:
  • Constructor Details

    • DeadlineJobDataBinder

      public DeadlineJobDataBinder()
  • Method Details

    • toJobData

      public static org.quartz.JobDataMap toJobData(Serializer serializer, DeadlineMessage deadlineMessage, ScopeDescriptor deadlineScope)
      Serializes the provided deadlineMessage and deadlineScope and puts them in a JobDataMap.
      Parameters:
      serializer - the Serializer used to serialize the given deadlineMessage and deadlineScope
      deadlineMessage - the DeadlineMessage to be handled
      deadlineScope - the ScopeDescriptor of the Scope the deadlineMessage should go to.
      Returns:
      a JobDataMap containing the deadlineMessage and deadlineScope
    • deadlineMessage

      public static DeadlineMessage deadlineMessage(Serializer serializer, org.quartz.JobDataMap jobDataMap)
      Extracts a DeadlineMessage from provided jobDataMap. Note that this function is able to retrieve two different formats of DeadlineMessage. The first being a now deprecated solution which used to serialized the entire DeadlineMessage into the JobDataMap. This is only kept for backwards compatibility. The second is the new solution which stores all the required deadline fields separately, only de-/serializing the payload and metadata of a DeadlineMessage instead of the entire message.
      Parameters:
      serializer - the Serializer used to deserialize the contents of the given jobDataMap} into a DeadlineMessage
      jobDataMap - the JobDataMap which should contain a DeadlineMessage
      Returns:
      the DeadlineMessage pulled from the jobDataMap
    • deadlineScope

      public static ScopeDescriptor deadlineScope(Serializer serializer, org.quartz.JobDataMap jobDataMap)
      Extracts a ScopeDescriptor describing the deadline Scope, pulled from provided jobDataMap.
      Parameters:
      serializer - the Serializer used to deserialize the contents of the given jobDataMap} into a ScopeDescriptor
      jobDataMap - the JobDataMap which should contain a ScopeDescriptor
      Returns:
      the ScopeDescriptor describing the deadline Scope, pulled from provided jobDataMap