@Override
  public NamingEnumeration listBindings(Name name) throws NamingException {
    checkIsDestroyed();
    Name parsedName = getParsedName(name);
    if (parsedName.size() == 0) {
      Vector bindings = new Vector();
      for (final Object o : ctxMaps.keySet()) {
        String bindingName = (String) o;
        bindings.addElement(new Binding(bindingName, ctxMaps.get(bindingName)));
      }
      return new NamingEnumerationImpl(bindings);
    } else {
      Object subContext = ctxMaps.get(parsedName.get(0));
      if (subContext instanceof Context) {
        Name nextLayer = nameParser.parse("");
        // getSuffix(1) only apply to name with size() > 1
        if (parsedName.size() > 1) {
          nextLayer = parsedName.getSuffix(1);
        }
        return ((Context) subContext).list(nextLayer);
      }
      if (subContext == null && !ctxMaps.containsKey(parsedName.get(0))) {
        throw new NameNotFoundException(
            String.format("Name %s not found", name));
      } else {
        throw new NotContextException(String.format("Expected Context but found %s",
            subContext));
      }
    }
  }
Lists all bindings for Context with name name. If name is empty then this Context is assumed.

@param name name of Context, relative to this Context
@return NamingEnumeration of all name-object pairs. Each element from the enumeration is
        instance of Binding.
@throws NoPermissionException if this context has been destroyed
@throws InvalidNameException if name is CompositeName that spans more than one naming system
@throws NameNotFoundException if name can not be found
@throws NotContextException component of name is not bound to instance of ContextImpl, when
        name is not an atomic name
@throws NamingException if any other naming error occurs
geode-core/src/main/java/org/apache/geode/internal/jndi/ContextImpl.java