Package net.solarnetwork.node.runtime
Class SimpleNodeControlsService
java.lang.Object
net.solarnetwork.service.support.BasicIdentifiable
net.solarnetwork.node.service.support.BaseIdentifiable
net.solarnetwork.node.runtime.SimpleNodeControlsService
- All Implemented Interfaces:
InstructionHandler,net.solarnetwork.service.Identifiable
Service to support node control management.
- Since:
- 3.3
- Version:
- 1.0
- Author:
- matt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default UID for this service.static final StringAn optional instruction parameter containing an Ant-style path pattern to filter the returned control IDs by.Fields inherited from class net.solarnetwork.node.service.support.BaseIdentifiable
logFields inherited from interface net.solarnetwork.service.Identifiable
GROUP_UID_PROPERTY, UID_PROPERTYFields inherited from interface net.solarnetwork.node.reactor.InstructionHandler
PARAM_ID, PARAM_MESSAGE, PARAM_SERVICE, PARAM_SERVICE_ARGUMENT, PARAM_SERVICE_RESULT, PARAM_STATUS_CODE, TOPIC_CANCEL_INSTRUCTION, TOPIC_DEMAND_BALANCE, TOPIC_SET_CONTROL_PARAMETER, TOPIC_SET_OPERATING_STATE, TOPIC_SHED_LOAD, TOPIC_SIGNAL, TOPIC_SYSTEM_CONFIGURATION, TOPIC_SYSTEM_CONFIGURE -
Constructor Summary
ConstructorsConstructorDescriptionSimpleNodeControlsService(Collection<NodeControlProvider> providers) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhandlesTopic(String topic) Test if a topic is handled by this handler.processInstruction(Instruction instruction) Process an instruction.Methods inherited from class net.solarnetwork.node.service.support.BaseIdentifiable
baseIdentifiableSettings, baseIdentifiableSettings, getExpressionServices, getPlaceholderService, populateExpressionDatumProperties, resolvePlaceholders, resolvePlaceholders, setExpressionServices, setPlaceholderServiceMethods inherited from class net.solarnetwork.service.support.BasicIdentifiable
basicIdentifiableMetadataSettings, basicIdentifiableSettings, basicIdentifiableSettings, basicIdentifiableSettings, doubleMetadataValue, getDisplayName, getGroupUid, getGroupUID, getMessageSource, getMetadata, getMetadataCount, getUid, getUID, integerMetadataValue, metadataValue, numberMetadataValue, saveMetadataValue, saveMetadataValue, setDisplayName, setGroupUid, setGroupUID, setMessageSource, setMetadata, setMetadataCount, setUid, setUID, smartMetadataValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.service.Identifiable
getDisplayName, getGroupUid, getUid
-
Field Details
-
CONTROLS_SERVICE_UID
The default UID for this service.- See Also:
-
PARAM_FILTER
An optional instruction parameter containing an Ant-style path pattern to filter the returned control IDs by.- See Also:
-
-
Constructor Details
-
SimpleNodeControlsService
Constructor.- Parameters:
providers- the control providers- Throws:
IllegalArgumentException- if any argument is null
-
-
Method Details
-
handlesTopic
Description copied from interface:InstructionHandlerTest if a topic is handled by this handler.- Specified by:
handlesTopicin interfaceInstructionHandler- Parameters:
topic- the topic- Returns:
- true only if this handler can execute the job for the given topic
-
processInstruction
Description copied from interface:InstructionHandlerProcess an instruction.- Specified by:
processInstructionin interfaceInstructionHandler- Parameters:
instruction- the instruction to process- Returns:
- the status for the instruction, or null if the instruction was not handled
-