Interface IAgentCommand<R extends IAgentResponse>
- Type Parameters:
R- The typed response record returned by this command.
- All Known Implementing Classes:
BlockType.Command,CancelNextEvents.Command,ClearCapturedEvents.Command,ClearServerErrors.Command,ClickMenuSlot.Command,CreatePlayer.Command,DragMenuSlots.Command,DropItem.Command,ExecuteCommand.Command,ExecutePlayerCommand.Command,GetCapturedEvents.Command,GetOpenMenu.Command,GetPlayerChatComponents.Command,GetPlayerInventory.Command,GetPlayerMessages.Command,GetServerErrors.Command,GetServerPlatform.Command,GetServerPlugins.Command,GetServerTick.Command,Handshake.Command,HasPlayerPermission.Command,IsChunkLoaded.Command,LeftClickBlock.Command,LoadChunk.Command,MainWorld.Command,MutatePlayerPermission.Command,NewWorld.Command,PlacePlayerBlock.Command,PlayerChat.Command,QueryEntities.Command,RegisterEventListener.Command,RemovePlayer.Command,RightClickBlock.Command,SetBlock.Command,TabCompletePlayer.Command,TeleportPlayer.Command,UnloadChunk.Command,UnregisterEventListener.Command,WaitTicks.Command
public sealed interface IAgentCommand<R extends IAgentResponse>
permits BlockType.Command, CancelNextEvents.Command, ClearCapturedEvents.Command, ClearServerErrors.Command, ClickMenuSlot.Command, CreatePlayer.Command, DragMenuSlots.Command, DropItem.Command, ExecuteCommand.Command, ExecutePlayerCommand.Command, GetCapturedEvents.Command, GetOpenMenu.Command, GetPlayerChatComponents.Command, GetPlayerInventory.Command, GetPlayerMessages.Command, GetServerErrors.Command, GetServerPlatform.Command, GetServerPlugins.Command, GetServerTick.Command, Handshake.Command, HasPlayerPermission.Command, IsChunkLoaded.Command, LeftClickBlock.Command, LoadChunk.Command, MainWorld.Command, MutatePlayerPermission.Command, NewWorld.Command, PlacePlayerBlock.Command, PlayerChat.Command, QueryEntities.Command, RegisterEventListener.Command, RemovePlayer.Command, RightClickBlock.Command, SetBlock.Command, TabCompletePlayer.Command, TeleportPlayer.Command, UnloadChunk.Command, UnregisterEventListener.Command, WaitTicks.Command
Sealed command hierarchy for the LightKeeper agent protocol.
Every protocol action is represented by exactly one record implementing this interface. Jackson uses the
"action" JSON property to select the correct subtype during deserialization. Discriminators reuse the naming
scheme of the former AgentAction enum for readability. The wire format is versioned through
RuntimeProtocol.VERSION; clients using another version are rejected during the handshake.
Adding a new action requires:
(1) a new namespace class with inner Command and Response
records, (2) a new JsonSubTypes.Type entry here, (3) a command permits entry here, and (4) a response
permits entry in IAgentResponse. The pattern-matching switch in AgentRequestDispatcher will
then fail to compile until the case is handled — intentional.
-
Method Summary
Modifier and TypeMethodDescriptionCorrelation identifier matching the response'srequestId.Returns the concrete response class for this command, used by the client to deserialize typed responses.
-
Method Details
-
requestId
String requestId()Correlation identifier matching the response'srequestId.- Returns:
- Non-blank request identifier.
-
responseType
Returns the concrete response class for this command, used by the client to deserialize typed responses.- Returns:
- Non-null response class token.
-