Interface InstructionStatus

All Known Implementing Classes:
BasicInstructionStatus

public interface InstructionStatus
Status information for a single Instruction.
Since:
2.0
Version:
1.0
Author:
matt
  • Field Details

    • MESSAGE_RESULT_PARAM

      static final String MESSAGE_RESULT_PARAM
      A standard result parameter key for a message (typically an error message).
      See Also:
    • ERROR_CODE_RESULT_PARAM

      static final String ERROR_CODE_RESULT_PARAM
      A standard result parameter key for an error code.
      See Also:
  • Method Details

    • getInstructionId

      Long getInstructionId()
      Get the ID of the instruction this state is associated with.
      Returns:
      the primary key
    • getInstructionState

      InstructionStatus.InstructionState getInstructionState()
      Get the current instruction state.
      Returns:
      the current instruction state
    • getStatusDate

      Instant getStatusDate()
      Get the date/time the instruction state was queried.
      Returns:
      the status date
    • getResultParameters

      Map<String,?> getResultParameters()
      Get result parameters.
      Returns:
      the result parameters, or null if none available
    • newCopyWithState

      default InstructionStatus newCopyWithState(InstructionStatus.InstructionState newState)
      Create a new InstructionStatus copy with a new state.
      Parameters:
      newState - the new state
      Returns:
      the new instance
    • newCopyWithState

      InstructionStatus newCopyWithState(InstructionStatus.InstructionState newState, Map<String,?> resultParameters)
      Create a new InstructionStatus copy with a new state and result parameters.
      Parameters:
      newState - the new state
      resultParameters - the result parameters
      Returns:
      the new instance
      Since:
      1.1
    • createStatus

      static InstructionStatus createStatus(Instruction instruction, InstructionStatus.InstructionState state, Instant date, Map<String,?> resultParameters)
      Create a new status for a given instruction.
      Parameters:
      instruction - the instruction, or null
      state - the new state
      date - the status date
      resultParameters - the optional result parameters
      Returns:
      the status, never null