@Override
  protected void doReceive(Message message) throws Exception {
    String command = message.getString("command");
    String servletContextName = message.getString("servletContextName");

    if (command.equals("undeploy") && servletContextName.equals(getServletContextName())) {
      RestLocalServiceUtil.clearService();

      RestServiceUtil.clearService();
    }
  }
 public JSONObject delete(String path) {
   return RestLocalServiceUtil.delete(path);
 }
 public JSONObject updateStatus(String body) {
   return RestLocalServiceUtil.updateStatus(body);
 }
 public JSONObject post(String path, String post, String username, String password) {
   return RestLocalServiceUtil.post(path, post, username, password);
 }
 public JSONObject post(String path, String post) {
   return RestLocalServiceUtil.post(path, post);
 }
 public JSONObject get(String path, String username, String password) {
   return RestLocalServiceUtil.get(path, username, password);
 }
 public JSONObject get(String path) {
   return RestLocalServiceUtil.get(path);
 }