Package net.solarnetwork.node.reactor
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
ConstructorsConstructorDescriptionBasicInstructionStatus(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 TypeMethodDescriptionnet.solarnetwork.domain.InstructionStatus.InstructionStateGet 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.toString()Methods inherited from class net.solarnetwork.domain.BasicInstructionStatus
equals, getInstructionId, getInstructionState, getResultParameters, getStatusDate, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.solarnetwork.domain.InstructionStatus
getInstructionId, getInstructionState, getResultParameters, getStatusDateMethods 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 IDinstructionState- the instruction statestatusDate- 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 IDinstructionState- the instruction statestatusDate- the status dateackInstructionState- 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 IDinstructionState- the instruction statestatusDate- the status dateackInstructionState- the acknowledged stateresultParameters- the result parameters- Since:
- 1.2
-
-
Method Details
-
toString
- Overrides:
toStringin classnet.solarnetwork.domain.BasicInstructionStatus
-
newCopyWithState
public InstructionStatus newCopyWithState(net.solarnetwork.domain.InstructionStatus.InstructionState newState, Map<String, ?> resultParameters) Description copied from interface:InstructionStatusCreate a new InstructionStatus copy with a new state and result parameters.- Specified by:
newCopyWithStatein interfacenet.solarnetwork.domain.InstructionStatus- Specified by:
newCopyWithStatein interfaceInstructionStatus- Overrides:
newCopyWithStatein classnet.solarnetwork.domain.BasicInstructionStatus- Parameters:
newState- the new stateresultParameters- the result parameters- Returns:
- the new instance
-
newCopyWithAcknowledgedState
public InstructionStatus newCopyWithAcknowledgedState(net.solarnetwork.domain.InstructionStatus.InstructionState newState, Map<String, ?> resultParameters) Description copied from interface:InstructionStatusCreate a new InstructionStatus copy with a new acknowledged state.- Specified by:
newCopyWithAcknowledgedStatein interfaceInstructionStatus- Parameters:
newState- the new stateresultParameters- the result parameters- Returns:
- the new instance
-
getAcknowledgedInstructionState
public net.solarnetwork.domain.InstructionStatus.InstructionState getAcknowledgedInstructionState()Description copied from interface:InstructionStatusGet the acknowledged instruction state.This is the state that has been posted back to SolarNet.
- Specified by:
getAcknowledgedInstructionStatein interfaceInstructionStatus- Returns:
- the acknowledged instruction state, or null if never acknowledged
-