public void send() { Msg msg = this.mp.getMsg(); try { msg.getOut().put("Simple request".getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { // Just suppress the exception handling in this demo code } try { client.sendRequest(msg); } catch (IOException e) { // all exceptions thrown extend IOException LOG.error(e.toString()); } }
public void close() { client.close(); }