Class BasicInstructionStatus

java.lang.Object
net.solarnetwork.domain.BasicInstructionStatus
net.solarnetwork.node.reactor.BasicInstructionStatus
All Implemented Interfaces:
Serializable, net.solarnetwork.domain.InstructionStatus, InstructionStatus

public class BasicInstructionStatus extends net.solarnetwork.domain.BasicInstructionStatus implements InstructionStatus, Serializable
Basic implementation of InstructionStatus.
Version:
2.0
Author:
matt
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.solarnetwork.domain.InstructionStatus

    net.solarnetwork.domain.InstructionStatus.InstructionState
  • Field Summary

    Fields inherited from interface net.solarnetwork.domain.InstructionStatus

    ERROR_CODE_RESULT_PARAM, MESSAGE_RESULT_PARAM
  • Constructor Summary

    Constructors
    Constructor
    Description
    BasicInstructionStatus(Long instructionId, net.solarnetwork.domain.InstructionStatus.InstructionState instructionState, Instant statusDate)
    Constructor.
    BasicInstructionStatus(Long instructionId, net.solarnetwork.domain.InstructionStatus.InstructionState instructionState, Instant statusDate, net.solarnetwork.domain.InstructionStatus.InstructionState ackInstructionState)
    Constructor.
    BasicInstructionStatus(Long instructionId, net.solarnetwork.domain.InstructionStatus.InstructionState instructionState, Instant statusDate, net.solarnetwork.domain.InstructionStatus.InstructionState ackInstructionState, Map<String,?> resultParameters)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.solarnetwork.domain.InstructionStatus.InstructionState
    Get the acknowledged instruction state.
    newCopyWithAcknowledgedState(net.solarnetwork.domain.InstructionStatus.InstructionState newState, Map<String,?> resultParameters)
    Create a new InstructionStatus copy with a new acknowledged state.
    newCopyWithState(net.solarnetwork.domain.InstructionStatus.InstructionState newState, Map<String,?> resultParameters)
    Create a new InstructionStatus copy with a new state and result parameters.
     

    Methods inherited from class net.solarnetwork.domain.BasicInstructionStatus

    equals, getInstructionId, getInstructionState, getResultParameters, getStatusDate, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.solarnetwork.domain.InstructionStatus

    getInstructionId, getInstructionState, getResultParameters, getStatusDate

    Methods inherited from interface net.solarnetwork.node.reactor.InstructionStatus

    newCopyWithAcknowledgedState, newCopyWithState
  • Constructor Details

    • BasicInstructionStatus

      public BasicInstructionStatus(Long instructionId, net.solarnetwork.domain.InstructionStatus.InstructionState instructionState, Instant statusDate)
      Constructor.
      Parameters:
      instructionId - the instruction ID
      instructionState - the instruction state
      statusDate - the status date
    • BasicInstructionStatus

      public BasicInstructionStatus(Long instructionId, net.solarnetwork.domain.InstructionStatus.InstructionState instructionState, Instant statusDate, net.solarnetwork.domain.InstructionStatus.InstructionState ackInstructionState)
      Constructor.
      Parameters:
      instructionId - the instruction ID
      instructionState - the instruction state
      statusDate - the status date
      ackInstructionState - the acknowledged state
    • BasicInstructionStatus

      public BasicInstructionStatus(Long instructionId, net.solarnetwork.domain.InstructionStatus.InstructionState instructionState, Instant statusDate, net.solarnetwork.domain.InstructionStatus.InstructionState ackInstructionState, Map<String,?> resultParameters)
      Constructor.
      Parameters:
      instructionId - the instruction ID
      instructionState - the instruction state
      statusDate - the status date
      ackInstructionState - the acknowledged state
      resultParameters - the result parameters
      Since:
      1.2
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class net.solarnetwork.domain.BasicInstructionStatus
    • newCopyWithState

      public InstructionStatus newCopyWithState(net.solarnetwork.domain.InstructionStatus.InstructionState newState, Map<String,?> resultParameters)
      Description copied from interface: InstructionStatus
      Create a new InstructionStatus copy with a new state and result parameters.
      Specified by:
      newCopyWithState in interface net.solarnetwork.domain.InstructionStatus
      Specified by:
      newCopyWithState in interface InstructionStatus
      Overrides:
      newCopyWithState in class net.solarnetwork.domain.BasicInstructionStatus
      Parameters:
      newState - the new state
      resultParameters - the result parameters
      Returns:
      the new instance
    • newCopyWithAcknowledgedState

      public InstructionStatus newCopyWithAcknowledgedState(net.solarnetwork.domain.InstructionStatus.InstructionState newState, Map<String,?> resultParameters)
      Description copied from interface: InstructionStatus
      Create a new InstructionStatus copy with a new acknowledged state.
      Specified by:
      newCopyWithAcknowledgedState in interface InstructionStatus
      Parameters:
      newState - the new state
      resultParameters - the result parameters
      Returns:
      the new instance
    • getAcknowledgedInstructionState

      public net.solarnetwork.domain.InstructionStatus.InstructionState getAcknowledgedInstructionState()
      Description copied from interface: InstructionStatus
      Get the acknowledged instruction state.

      This is the state that has been posted back to SolarNet.

      Specified by:
      getAcknowledgedInstructionState in interface InstructionStatus
      Returns:
      the acknowledged instruction state, or null if never acknowledged