示例#1
0
 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());
   }
 }
示例#2
0
 public void close() {
   client.close();
 }