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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    An ID to use for locally-initiated instructions, in getInstructorId().
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Get 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

  • Method Details

    • getIdentifier

      default String 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:
      getStatus in interface net.solarnetwork.domain.Instruction
      Returns:
      the state, or null if none available