/** * Processes an incoming JMS message returning the response message */ public Message processCommand(TextMessage request) throws Exception { TextMessage response = session.createTextMessage(); getHandler().processCommand(request, response); return response; }
/** * Processes an incoming command from a console and returning the text to * output */ public String processCommandText(String line) throws Exception { TextMessage request = new ActiveMQTextMessage(); request.setText(line); TextMessage response = new ActiveMQTextMessage(); getHandler().processCommand(request, response); return response.getText(); }