Package nl.pim16aap2.lightkeeper.protocol


package nl.pim16aap2.lightkeeper.protocol
Agent protocol command types.

Contains the sealed IAgentCommand interface and one typed record per protocol action. The IAgentResponse and AgentErrorCode types for the response side live here too.

Commands are ordinary typed records and use the shared wire mapper for polymorphic round trips:


 ObjectMapper mapper = AgentProtocolMapper.create();
 IAgentCommand<?> command = new MainWorld.Command("request-1");
 String json = mapper.writeValueAsString(command);
 IAgentCommand<?> decoded = mapper.readValue(json, IAgentCommand.class);
 

See IAgentCommand for the complete registration recipe when adding a protocol action.