use of com.hazelcast.internal.ascii.CommandParser in project hazelcast by hazelcast.
the class TextReadHandler method processCmd.
private void processCmd(String cmd) {
try {
int space = cmd.indexOf(' ');
String operation = (space == -1) ? cmd : cmd.substring(0, space);
CommandParser commandParser = MAP_COMMAND_PARSERS.get(operation);
if (commandParser != null) {
command = commandParser.parser(this, cmd, space);
} else {
command = new ErrorCommand(UNKNOWN);
}
} catch (Throwable t) {
logger.finest(t);
command = new ErrorCommand(ERROR_CLIENT, "Invalid command : " + cmd);
}
}
Aggregations