/** * Parse an XML element of type {@code name-type} from an XML reader. * * @param reader the XML stream reader * @return the parsed name * @throws ConfigXMLParseException if the resource failed to be parsed */ static String parseNameType(ConfigurationXMLStreamReader reader) throws ConfigXMLParseException { return parseNameType(reader, false); }
private static void parseSslContextsType(final ConfigurationXMLStreamReader reader, final Version xmlVersion, final Map<String, ExceptionSupplier<SecurityFactory<SSLContext>, ConfigXMLParseException>> sslContextsMap, final Map<String, ExceptionSupplier<KeyStore, ConfigXMLParseException>> keyStoresMap, final Map<String, ExceptionSupplier<CredentialStore, ConfigXMLParseException>> credentialStoresMap, final Supplier<Provider[]> providers) throws ConfigXMLParseException { requireNoAttributes(reader); while (reader.hasNext()) { final int tag = reader.nextTag(); if (tag == START_ELEMENT) { checkElementNamespace(reader, xmlVersion); switch (reader.getLocalName()) { case "ssl-context": { parseSslContextType(reader, xmlVersion, sslContextsMap, keyStoresMap, credentialStoresMap, providers); break; } case "default-ssl-context": { final String name = parseNameType(reader); sslContextsMap.put(name, () -> SSLContext::getDefault); break; } default: { throw reader.unexpectedElement(); } } } else if (tag == END_ELEMENT) { return; } else { throw reader.unexpectedContent(); } } throw reader.unexpectedDocumentEnd(); }
if (isSet(foundBits, 0)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 0); rule = rule.matchUser(parseNameType(reader)); break; if (isSet(foundBits, 1)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 1); rule = rule.matchProtocol(parseNameType(reader)); break; if (isSet(foundBits, 2)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 2); rule = rule.matchHost(parseNameType(reader)); break; if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); rule = rule.matchPath(parseNameType(reader)); break; if (isSet(foundBits, 5)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 5); rule = rule.matchUrnName(parseNameType(reader)); break; if (isSet(foundBits, 6)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 6); rule = rule.matchLocalSecurityDomain(parseNameType(reader)); break;
if (isSet(foundBits, 0)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 0); final String hostName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useHost(hostName)); xmlLog.xmlDeprecatedElement(reader.getLocalName(), reader.getLocation()); if (isSet(foundBits, 2)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 2); final String userName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useName(userName)); break; if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); final String realm = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useRealm(realm)); break; if (isSet(foundBits, 10)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 10); final String authName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useAuthorizationName(authName)); break; if (isSet(foundBits, 13)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 13); final String protocol = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useProtocol(protocol)); xmlLog.xmlDeprecatedElement(reader.getLocalName(), reader.getLocation());
fileSource = parseNameType(reader); break;
if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); providerName = parseNameType(reader); break;
/** * Parse an XML element of type {@code name-type} from an XML reader. * * @param reader the XML stream reader * @return the parsed name * @throws ConfigXMLParseException if the resource failed to be parsed */ static String parseNameType(ConfigurationXMLStreamReader reader) throws ConfigXMLParseException { return parseNameType(reader, false); }
/** * Parse an XML element of type {@code name-type} from an XML reader. * * @param reader the XML stream reader * @return the parsed name * @throws ConfigXMLParseException if the resource failed to be parsed */ static String parseNameType(ConfigurationXMLStreamReader reader) throws ConfigXMLParseException { return parseNameType(reader, false); }
/** * Parse an XML element of type {@code name-type} from an XML reader. * * @param reader the XML stream reader * @return the parsed name * @throws ConfigXMLParseException if the resource failed to be parsed */ static String parseNameType(ConfigurationXMLStreamReader reader) throws ConfigXMLParseException { return parseNameType(reader, false); }
private static void parseSslContextsType(final ConfigurationXMLStreamReader reader, final Version xmlVersion, final Map<String, ExceptionSupplier<SecurityFactory<SSLContext>, ConfigXMLParseException>> sslContextsMap, final Map<String, ExceptionSupplier<KeyStore, ConfigXMLParseException>> keyStoresMap, final Map<String, ExceptionSupplier<CredentialStore, ConfigXMLParseException>> credentialStoresMap, final Supplier<Provider[]> providers) throws ConfigXMLParseException { requireNoAttributes(reader); while (reader.hasNext()) { final int tag = reader.nextTag(); if (tag == START_ELEMENT) { checkElementNamespace(reader, xmlVersion); switch (reader.getLocalName()) { case "ssl-context": { parseSslContextType(reader, xmlVersion, sslContextsMap, keyStoresMap, credentialStoresMap, providers); break; } case "default-ssl-context": { final String name = parseNameType(reader); sslContextsMap.put(name, () -> SSLContext::getDefault); break; } default: { throw reader.unexpectedElement(); } } } else if (tag == END_ELEMENT) { return; } else { throw reader.unexpectedContent(); } } throw reader.unexpectedDocumentEnd(); }
private static void parseSslContextsType(final ConfigurationXMLStreamReader reader, final Version xmlVersion, final Map<String, ExceptionSupplier<SecurityFactory<SSLContext>, ConfigXMLParseException>> sslContextsMap, final Map<String, ExceptionSupplier<KeyStore, ConfigXMLParseException>> keyStoresMap, final Map<String, ExceptionSupplier<CredentialStore, ConfigXMLParseException>> credentialStoresMap, final Supplier<Provider[]> providers) throws ConfigXMLParseException { requireNoAttributes(reader); while (reader.hasNext()) { final int tag = reader.nextTag(); if (tag == START_ELEMENT) { checkElementNamespace(reader, xmlVersion); switch (reader.getLocalName()) { case "ssl-context": { parseSslContextType(reader, xmlVersion, sslContextsMap, keyStoresMap, credentialStoresMap, providers); break; } case "default-ssl-context": { final String name = parseNameType(reader); sslContextsMap.put(name, () -> SSLContext::getDefault); break; } default: { throw reader.unexpectedElement(); } } } else if (tag == END_ELEMENT) { return; } else { throw reader.unexpectedContent(); } } throw reader.unexpectedDocumentEnd(); }
private static void parseSslContextsType(final ConfigurationXMLStreamReader reader, final Version xmlVersion, final Map<String, ExceptionSupplier<SecurityFactory<SSLContext>, ConfigXMLParseException>> sslContextsMap, final Map<String, ExceptionSupplier<KeyStore, ConfigXMLParseException>> keyStoresMap, final Map<String, ExceptionSupplier<CredentialStore, ConfigXMLParseException>> credentialStoresMap, final Supplier<Provider[]> providers) throws ConfigXMLParseException { requireNoAttributes(reader); while (reader.hasNext()) { final int tag = reader.nextTag(); if (tag == START_ELEMENT) { checkElementNamespace(reader, xmlVersion); switch (reader.getLocalName()) { case "ssl-context": { parseSslContextType(reader, xmlVersion, sslContextsMap, keyStoresMap, credentialStoresMap, providers); break; } case "default-ssl-context": { final String name = parseNameType(reader); sslContextsMap.put(name, () -> SSLContext::getDefault); break; } default: { throw reader.unexpectedElement(); } } } else if (tag == END_ELEMENT) { return; } else { throw reader.unexpectedContent(); } } throw reader.unexpectedDocumentEnd(); }
if (isSet(foundBits, 0)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 0); rule = rule.matchUser(parseNameType(reader)); break; if (isSet(foundBits, 1)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 1); rule = rule.matchProtocol(parseNameType(reader)); break; if (isSet(foundBits, 2)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 2); rule = rule.matchHost(parseNameType(reader)); break; if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); rule = rule.matchPath(parseNameType(reader)); break; if (isSet(foundBits, 5)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 5); rule = rule.matchUrnName(parseNameType(reader)); break; if (isSet(foundBits, 6)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 6); rule = rule.matchLocalSecurityDomain(parseNameType(reader)); break;
if (isSet(foundBits, 0)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 0); rule = rule.matchUser(parseNameType(reader)); break; if (isSet(foundBits, 1)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 1); rule = rule.matchProtocol(parseNameType(reader)); break; if (isSet(foundBits, 2)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 2); rule = rule.matchHost(parseNameType(reader)); break; if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); rule = rule.matchPath(parseNameType(reader)); break; if (isSet(foundBits, 5)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 5); rule = rule.matchUrnName(parseNameType(reader)); break; if (isSet(foundBits, 6)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 6); rule = rule.matchLocalSecurityDomain(parseNameType(reader)); break;
if (isSet(foundBits, 0)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 0); rule = rule.matchUser(parseNameType(reader)); break; if (isSet(foundBits, 1)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 1); rule = rule.matchProtocol(parseNameType(reader)); break; if (isSet(foundBits, 2)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 2); rule = rule.matchHost(parseNameType(reader)); break; if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); rule = rule.matchPath(parseNameType(reader)); break; if (isSet(foundBits, 5)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 5); rule = rule.matchUrnName(parseNameType(reader)); break; if (isSet(foundBits, 6)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 6); rule = rule.matchLocalSecurityDomain(parseNameType(reader)); break;
if (isSet(foundBits, 0)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 0); final String hostName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useHost(hostName)); xmlLog.xmlDeprecatedElement(reader.getLocalName(), reader.getLocation()); if (isSet(foundBits, 2)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 2); final String userName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useName(userName)); break; if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); final String realm = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useRealm(realm)); break; if (isSet(foundBits, 10)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 10); final String authName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useAuthorizationName(authName)); break; if (isSet(foundBits, 13)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 13); final String protocol = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useProtocol(protocol)); xmlLog.xmlDeprecatedElement(reader.getLocalName(), reader.getLocation());
if (isSet(foundBits, 0)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 0); final String hostName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useHost(hostName)); xmlLog.xmlDeprecatedElement(reader.getLocalName(), reader.getLocation()); if (isSet(foundBits, 2)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 2); final String userName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useName(userName)); break; if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); final String realm = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useRealm(realm)); break; if (isSet(foundBits, 10)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 10); final String authName = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useAuthorizationName(authName)); break; if (isSet(foundBits, 13)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 13); final String protocol = parseNameType(reader); configuration = andThenOp(configuration, parentConfig -> parentConfig.useProtocol(protocol)); xmlLog.xmlDeprecatedElement(reader.getLocalName(), reader.getLocation());
if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); providerName = parseNameType(reader); break;
if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); providerName = parseNameType(reader); break;
if (isSet(foundBits, 3)) throw reader.unexpectedElement(); foundBits = setBit(foundBits, 3); providerName = parseNameType(reader); break;