code: private Handler<AsyncResult<String>> createDeploymentHandler(final Message<JsonObject> message) {
      return new Handler<AsyncResult<String>>() {
        @Override
        public void handle(AsyncResult<String> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            addNewDeployment(result.result(), message.body(), new Handler<AsyncResult<String>>() {
              @Override
              public void handle(AsyncResult<String> result) {
                message.reply(new JsonObject().putString("status", "ok").putString("id", result.result()));
              }
            });
          }
        }
      };
    }
docs: Creates a platform deployment handler.