class RestrictedMethodAuthorizer implements MethodInvocationAuthorizer {

  public boolean isAllowedGeodeMethod(Method method, Object target) {
    String methodName = method.getName();
    Set<Class> allowedGeodeClassesForMethod = allowedGeodeMethodsPerClass.get(methodName);

    if (allowedGeodeClassesForMethod == null) {
      return false;
    }

    for (Class<?> clazz : allowedGeodeClassesForMethod) {
      if (clazz.isAssignableFrom(target.getClass())) {
        try {
          authorizeRegionAccess(securityService, target);
          return true;
        } catch (NotAuthorizedException noAuthorizedException) {
          return false;
        }
      }
    }

    return false;
  }

  public  RestrictedMethodAuthorizer(Cache cache);

}