Class ClientCommandFactory

java.lang.Object
za.co.wethinkcode.robots.server.clientCommands.ClientCommandFactory

public class ClientCommandFactory extends Object
Factory pattern for processing Client Commands
  • Constructor Details

    • ClientCommandFactory

      public ClientCommandFactory()
  • Method Details

    • createCommand

      public static ClientCommand createCommand(ImplementedClientCommands commandType, ClientCommandRequest clientCommandRequest, WorldStateIdentity worldStateIdentity, com.fasterxml.jackson.databind.ObjectMapper objectMapper) throws ParsingFailedException
      Static method that allows in place creation of commands from the client
      Parameters:
      commandType - the type of command being created
      clientCommandRequest - the request of the command
      worldStateIdentity - the shared identity of the worldstate
      objectMapper - the object mapper
      Returns:
      a command from the client to be executed on the server
      Throws:
      ParsingFailedException