public static RegionResponse create(DistributionManager dm, InternalDistributedMember recipient,
      RegionRequest request) {
    RegionResponse m = new RegionResponse();

    try {
      Cache cache = CacheFactory.getInstance(dm.getSystem());

      int cacheId = request.cacheId;
      if (System.identityHashCode(cache) == cacheId) {
        Region r;
        int action = request.action;
        switch (action) {
          case RegionRequest.GET_REGION:
            r = cache.getRegion(request.path);
            break;

          case RegionRequest.CREATE_VM_ROOT:
            r = cache.createRegion(request.newRegionName, request.newRegionAttributes);
            break;

          case RegionRequest.CREATE_VM_REGION:
            Region parent = cache.getRegion(request.path);
            r = parent.createSubregion(request.newRegionName, request.newRegionAttributes);
            break;

          default:
            throw new InternalGemFireException(
                String.format("Unknown RegionRequest operation: %s",
                    action));
        }

        if (r != null) {
          m.name = r.getFullPath();
          m.userAttribute = (String) CacheDisplay.getCachedObjectDisplay(r.getUserAttribute(),
              GemFireVM.LIGHTWEIGHT_CACHE_VALUE);

        } else {
          m.name = null;
        }
      }
    } catch (CancelException cce) {
      /* no cache yet */

    } catch (Exception ex) {
      // Something went wrong while creating the region
      m.exception = ex;
    }
    m.setRecipient(recipient);
    return m;
  }
Returns a <code>RegionResponse</code> that will be returned to the specified recipient. The
message will contains a copy of the local manager's system config.
geode-core/src/main/java/org/apache/geode/internal/admin/remote/RegionResponse.java