private void handleExceptionThrownByApi(ReflectiveOperationException e)
      throws UnableToSetSerialFilterException {
    String className = getClassName(e);
    switch (className) {
      case "java.lang.IllegalAccessException":
        throw new UnableToSetSerialFilterException(
            "Unable to configure an input stream serialization filter using reflection.",
            e);
      case "java.lang.reflect.InvocationTargetException":
        if (getRootCause(e) instanceof IllegalStateException) {
          // ObjectInputFilter throws IllegalStateException
          // if the filter has already been set non-null
          throw new FilterAlreadyConfiguredException(
              "Unable to configure an input stream serialization filter because a non-null filter has already been set.",
              e);
        }
        String causeClassName = e.getCause() == null ? getClassName(e) : getClassName(e.getCause());
        throw new UnableToSetSerialFilterException(
            "Unable to configure an input stream serialization filter because invocation target threw "
                + causeClassName + ".",
            e);
      default:
        throw new UnableToSetSerialFilterException(
            "Unable to configure an input stream serialization filter.",
            e);
    }
  }
Invokes interface-defined operation to set this serialization filter on the specified target
{@code ObjectInputStream}.
geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeStreamSerialFilter.java