Package net.solarnetwork.node.reactor
Interface Instruction
- All Superinterfaces:
net.solarnetwork.domain.Instruction
- All Known Implementing Classes:
BasicInstruction
public interface Instruction
extends net.solarnetwork.domain.Instruction
API for a single, immutable instruction with associated parameters.
An instruction is like a single name (the topic) with an arbitrary
number of named key/value parameters. All parameter names and values are
Strings. Each parameter can have any number of associated values.
An Instruction is considered equal to another Instruction only if the
instructionId and instructorId values are equal.
- Version:
- 2.0
- Author:
- matt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAn ID to use for locally-initiated instructions, ingetInstructorId(). -
Method Summary
Modifier and TypeMethodDescriptiondefault StringGet an identifier for this instruction.Get the unique ID for the sender of the instruction, for example the DN of the sender's certificate.Get the instruction state.Methods inherited from interface net.solarnetwork.domain.Instruction
getAllParameterValues, getId, getInstructionDate, getInstructionState, getParameterMap, getParameterMultiMap, getParameterNames, getParameterValue, getTopic, isParameterAvailable
-
Field Details
-
LOCAL_INSTRUCTION_ID
An ID to use for locally-initiated instructions, ingetInstructorId().- See Also:
-
-
Method Details
-
getIdentifier
Get an identifier for this instruction.This can be used for logging, display, etc.
- Returns:
- an identifier, never null
-
getInstructorId
String getInstructorId()Get the unique ID for the sender of the instruction, for example the DN of the sender's certificate.- Returns:
- the instructor ID
-
getStatus
InstructionStatus getStatus()Get the instruction state.- Specified by:
getStatusin interfacenet.solarnetwork.domain.Instruction- Returns:
- the state, or null if none available
-