本文整理了Java中org.jboss.as.controller.parsing.Element.forName()
方法的一些代码示例,展示了Element.forName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.forName()
方法的具体详情如下:
包路径:org.jboss.as.controller.parsing.Element
类名称:Element
方法名:forName
暂无
代码示例来源:origin: wildfly/wildfly
private void parseIndexing(XMLExtendedStreamReader reader, PathAddress cacheAddress, Map<PathAddress, ModelNode> operations) throws XMLStreamException {
ModelNode operation = operations.get(cacheAddress);
for (int i = 0; i < reader.getAttributeCount(); i++) {
XMLAttribute attribute = XMLAttribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case INDEX: {
readAttribute(reader, i, operation, CacheResourceDefinition.DeprecatedAttribute.INDEXING);
break;
}
default: {
throw ParseUtils.unexpectedAttribute(reader, i);
}
}
}
while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
Element element = Element.forName(reader.getLocalName());
switch (element) {
case PROPERTY: {
ParseUtils.requireSingleAttribute(reader, XMLAttribute.NAME.getLocalName());
readElement(reader, operation, CacheResourceDefinition.DeprecatedAttribute.INDEXING_PROPERTIES);
break;
}
default: {
throw ParseUtils.unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
requireNamespace(reader, expectedNs);
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, expectedNs);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case JSON_FORMATTER:{
parseFileAuditLogFormatter(reader, address, list);
break;
}
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
requireNamespace(reader, expectedNs);
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, expectedNs);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case JSON_FORMATTER:{
parseFileAuditLogFormatter(reader, address, list);
break;
}
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
requireNamespace(reader, expectedNs);
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, expectedNs);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case JSON_FORMATTER:{
parseFileAuditLogFormatter(reader, address, list);
break;
}
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
requireNamespace(reader, expectedNs);
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, expectedNs);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case JSON_FORMATTER:{
parseFileAuditLogFormatter(reader, address, list);
break;
}
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
requireNamespace(reader, expectedNs);
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, expectedNs);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case JSON_FORMATTER:{
parseFileAuditLogFormatter(reader, address, list);
break;
}
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
requireNamespace(reader, expectedNs);
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, expectedNs);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case JSON_FORMATTER:{
parseFileAuditLogFormatter(reader, address, list);
break;
}
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-server
void parsePaths(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs,
final List<ModelNode> list, final boolean requirePath) throws XMLStreamException {
final Set<String> pathNames = new HashSet<String>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
final Element element = Element.forName(reader.getLocalName());
requireNamespace(reader, expectedNs);
switch (element) {
case PATH: {
parsePath(reader, address, list, requirePath, pathNames);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
final List<ModelNode> list) throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case LDAP: {
parseLdapConnection(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case SECURITY_REALM: {
parseSecurityRealm(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: org.jboss.as/jboss-as-host-controller
private void parseServers_1_0(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list)
throws XMLStreamException {
// Handle elements
final Set<String> names = new HashSet<String>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, expectedNs);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case SERVER:
parseServer(reader, address, expectedNs, list, names);
break;
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
final List<ModelNode> list) throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case LDAP: {
parseLdapConnection(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
final List<ModelNode> list) throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case LDAP: {
parseLdapConnection(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case SECURITY_REALM: {
parseSecurityRealm(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
private void parseServers_1_0(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {
// Handle elements
final Set<String> names = new HashSet<String>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case SERVER:
parseServer(reader, address, list, names);
break;
default:
throw unexpectedElement(reader);
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case SECURITY_REALM: {
parseSecurityRealm(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case SECURITY_REALM: {
parseSecurityRealm(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: org.jboss.as/jboss-as-server
protected void parsePaths(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list,
final boolean requirePath) throws XMLStreamException {
final Set<String> pathNames = new HashSet<String>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
final Element element = Element.forName(reader.getLocalName());
requireNamespace(reader, expectedNs);
switch (element) {
case PATH: {
parsePath(reader, address, list, requirePath, pathNames);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
final List<ModelNode> list) throws XMLStreamException {
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case LDAP: {
parseLdapConnection(reader, address, list);
break;
}
default: {
throw unexpectedElement(reader);
}
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private void parseServers_1_0(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {
// Handle elements
final Set<String> names = new HashSet<String>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
requireNamespace(reader, namespace);
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case SERVER:
parseServer(reader, address, list, names);
break;
default:
throw unexpectedElement(reader);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!