code: public void onCreateResource(final AddressTemplate addressTemplate, final String name, final ModelNode payload,
                                   final Callback... callback) {
          ModelNode op = payload.clone();
          op.get(ADDRESS).set(addressTemplate.resolve(statementContext, name));
          op.get(OP).set(ADD);
  
          dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() {
              @Override
              public void onFailure(Throwable caught) {
                  for (Callback cb : callback) {
                      cb.onFailure(addressTemplate, name, caught);
                  }
              }
  
              @Override
              public void onSuccess(DMRResponse result) {
                  ModelNode response = result.get();
                  if (response.isFailure()) {
                      for (Callback cb : callback) {
                          cb.onFailure(addressTemplate, name,
                                  new RuntimeException("Failed to add resource " +
                                          addressTemplate.replaceWildcards(name) + ":" + response.getFailureDescription()));
                      }
                  } else {
                      for (Callback cb : callback) {
                          cb.onSuccess(addressTemplate, name);
                      }
                  }
              }
          });
      }
docs: Creates a new resource using the given address, name and payload.
  @param addressTemplate The address template for the new resource. Might end with a wildcard,
  in that case the name is mandatory.
  @param name the name of the new resource. Might be null if the address template already contains the name.
  @param payload the payload
  @param callback the callbacks