public JsonCommand Handle(RawMessage message) { JsonCommand comm = MessageUtils.ParseAsCommandRequest(message.clientNo, message.getBodyText()); ICommand <string> commandProcessor = CommandProcessorFactory.GetProcessor(comm.Directive); if (commandProcessor == null) { logger.ErrorFormat("command#{0} has no command-processor", comm.directiveVal); return(JsonCommands.Fail("no command-processor")); } JsonCommand dr = commandProcessor.Execute(comm); return(dr); }