Package org.jtestserver.common.message

Examples of org.jtestserver.common.message.OutputMessage


                    public String process(String message) {
                        InputMessage input = InputMessage.create(message);
                        String commandName = input.getString();
                        TestServerCommand command = nameToCommand.get(commandName);
                       
                        OutputMessage output = null;
                        if (command == null) {
                            //TODO
                        } else {
                            try {
                                output = command.execute(input);
                            } catch (Throwable t) {
                                LOGGER.log(Level.SEVERE, "error in command", t);
                            }
                        }
                       
                        // if the command returns a result
                        String result = MessageProcessor.NO_RESPONSE;
                        if (output != null) {
                            result = output.toMessage();
                        }
                       
                        return result;
                    }
                });
View Full Code Here

TOP

Related Classes of org.jtestserver.common.message.OutputMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.