本文整理了Java中org.jboss.as.controller.parsing.Namespace.getMajorVersion()
方法的一些代码示例,展示了Namespace.getMajorVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Namespace.getMajorVersion()
方法的具体详情如下:
包路径:org.jboss.as.controller.parsing.Namespace
类名称:Namespace
方法名:getMajorVersion
[英]Get the major version represented by this namespace.
[中]获取此命名空间表示的主版本。
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
public static void parseJvm(final XMLExtendedStreamReader reader, final ModelNode parentAddress, final Namespace expectedNs, final List<ModelNode> updates,
final Set<String> jvmNames, final boolean server) throws XMLStreamException {
switch (expectedNs.getMajorVersion()) {
case 1:
case 2:
parseJvm_1_0(reader, parentAddress, expectedNs, updates, jvmNames, server);
break;
default:
parseJvm_3_0(reader, parentAddress, expectedNs, updates, jvmNames, server);
break;
}
}
代码示例来源:origin: wildfly/wildfly-core
public static void parseJvm(final XMLExtendedStreamReader reader, final ModelNode parentAddress, final Namespace expectedNs, final List<ModelNode> updates,
final Set<String> jvmNames, final boolean server) throws XMLStreamException {
switch (expectedNs.getMajorVersion()) {
case 1:
case 2:
parseJvm_1_0(reader, parentAddress, expectedNs, updates, jvmNames, server);
break;
default:
parseJvm_3_0(reader, parentAddress, expectedNs, updates, jvmNames, server);
break;
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
static ManagementXml newInstance(Namespace namespace, ManagementXmlDelegate delegate, boolean domainConfiguration) {
switch (namespace.getMajorVersion()) {
case 1:
case 2:
case 3:
return new ManagementXml_Legacy(namespace, delegate, domainConfiguration);
case 4:
return new ManagementXml_4(namespace, delegate, domainConfiguration);
default:
return new ManagementXml_5(namespace, delegate, domainConfiguration);
}
}
代码示例来源:origin: wildfly/wildfly-core
static AuditLogXml newInstance(Namespace namespace, boolean host) {
switch (namespace.getMajorVersion()) {
case 1:
case 2:
case 3:
return new AuditLogXml_Legacy(host);
case 4:
return new AuditLogXml_4(host);
default:
return new AuditLogXml_5(host);
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
static AuditLogXml newInstance(Namespace namespace, boolean host) {
switch (namespace.getMajorVersion()) {
case 1:
case 2:
case 3:
return new AuditLogXml_Legacy(host);
case 4:
return new AuditLogXml_4(host);
default:
return new AuditLogXml_5(host);
}
}
代码示例来源:origin: wildfly/wildfly-core
static ManagementXml newInstance(Namespace namespace, ManagementXmlDelegate delegate, boolean domainConfiguration) {
switch (namespace.getMajorVersion()) {
case 1:
case 2:
case 3:
return new ManagementXml_Legacy(namespace, delegate, domainConfiguration);
case 4:
return new ManagementXml_4(namespace, delegate, domainConfiguration);
default:
return new ManagementXml_5(namespace, delegate, domainConfiguration);
}
}
代码示例来源:origin: org.wildfly.core/wildfly-server
void parseVault(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
switch (expectedNs) {
case DOMAIN_1_0:
throw unexpectedElement(reader);
case DOMAIN_1_1:
case DOMAIN_1_2:
case DOMAIN_1_3:
case DOMAIN_1_4:
case DOMAIN_1_5:
parseVault_1_1(reader, address, expectedNs, list);
break;
default:
if (expectedNs.getMajorVersion() == 2) {
parseVault_1_1(reader, address, expectedNs, list);
} else {
parseVault_1_6_and_3_0(reader, address, expectedNs, list);
}
}
}
代码示例来源:origin: wildfly/wildfly-core
void parseVault(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
switch (expectedNs) {
case DOMAIN_1_0:
throw unexpectedElement(reader);
case DOMAIN_1_1:
case DOMAIN_1_2:
case DOMAIN_1_3:
case DOMAIN_1_4:
case DOMAIN_1_5:
parseVault_1_1(reader, address, expectedNs, list);
break;
default:
if (expectedNs.getMajorVersion() == 2) {
parseVault_1_1(reader, address, expectedNs, list);
} else {
parseVault_1_6_and_3_0(reader, address, expectedNs, list);
}
}
}
代码示例来源:origin: wildfly/wildfly-core
switch (namespace.getMajorVersion()) {
case 1:
switch (namespace) {
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
switch (namespace.getMajorVersion()) {
case 1:
switch (namespace) {
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
@Override
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> operationList)
throws XMLStreamException {
final ModelNode address = new ModelNode().setEmptyList();
if (Element.forName(reader.getLocalName()) != Element.HOST) {
throw unexpectedElement(reader);
}
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
if (readerNS == DOMAIN_1_0) {
readHostElement_1_0(reader, address, operationList);
} else if (readerNS.getMajorVersion() == 1 || readerNS.getMajorVersion() == 2) {
readHostElement_1_1(readerNS, reader, address, operationList);
} else {
// Instead of having to list the remaining versions we just check it is actually a valid version.
for (Namespace current : Namespace.domainValues()) {
if (readerNS.equals(current)) {
readHostElement_3_0(readerNS, reader, address, operationList);
return;
}
}
throw unexpectedElement(reader);
}
}
代码示例来源:origin: wildfly/wildfly-core
@Override
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> operationList)
throws XMLStreamException {
final ModelNode address = new ModelNode().setEmptyList();
if (Element.forName(reader.getLocalName()) != Element.HOST) {
throw unexpectedElement(reader);
}
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
if (readerNS == DOMAIN_1_0) {
readHostElement_1_0(reader, address, operationList);
} else if (readerNS.getMajorVersion() == 1 || readerNS.getMajorVersion() == 2) {
readHostElement_1_1(readerNS, reader, address, operationList);
} else {
// Instead of having to list the remaining versions we just check it is actually a valid version.
for (Namespace current : Namespace.domainValues()) {
if (readerNS.equals(current)) {
readHostElement_3_0(readerNS, reader, address, operationList);
return;
}
}
throw unexpectedElement(reader);
}
}
代码示例来源:origin: org.wildfly.core/wildfly-server
switch (namespace.getMajorVersion()) {
case 2:
if (http) {
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
if (namespace.getMajorVersion() == 1) {
代码示例来源:origin: org.wildfly.core/wildfly-server
throws XMLStreamException {
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
switch (readerNS.getMajorVersion()) {
case 1:
case 2:
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
@Override
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> nodes) throws XMLStreamException {
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
switch (readerNS.getMajorVersion()) {
case 1:
case 2:
case 3:
new DomainXml_Legacy(extensionXml, extensionRegistry, readerNS).readElement(reader, nodes);
break;
case 4:
new DomainXml_4(extensionXml, extensionRegistry, readerNS).readElement(reader, nodes);
break;
case 5:
new DomainXml_5(extensionXml, extensionRegistry, readerNS).readElement(reader, nodes);
break;
case 6:
new DomainXml_6(extensionXml, extensionRegistry, readerNS).readElement(reader, nodes);
break;
case 7:
new DomainXml_7(extensionXml, extensionRegistry, readerNS).readElement(reader, nodes);
break;
case 8:
new DomainXml_8(extensionXml, extensionRegistry, readerNS).readElement(reader, nodes);
break;
default:
new DomainXml_9(extensionXml, extensionRegistry, readerNS).readElement(reader, nodes);
break;
}
}
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
@Override
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> operationList)
throws XMLStreamException {
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
switch (readerNS.getMajorVersion()) {
case 1:
case 2:
case 3:
new HostXml_Legacy(defaultHostControllerName, runningMode, isCachedDc, extensionRegistry, extensionXml, readerNS).readElement(reader, operationList);
break;
case 4:
new HostXml_4(defaultHostControllerName, runningMode, isCachedDc, extensionRegistry, extensionXml, readerNS).readElement(reader, operationList);
break;
case 5:
new HostXml_5(defaultHostControllerName, runningMode, isCachedDc, extensionRegistry, extensionXml, readerNS).readElement(reader, operationList);
break;
case 6:
new HostXml_6(defaultHostControllerName, runningMode, isCachedDc, extensionRegistry, extensionXml, readerNS).readElement(reader, operationList);
break;
case 7:
new HostXml_7(defaultHostControllerName, runningMode, isCachedDc, extensionRegistry, extensionXml, readerNS).readElement(reader, operationList);
break;
case 8:
new HostXml_8(defaultHostControllerName, runningMode, isCachedDc, extensionRegistry, extensionXml, readerNS).readElement(reader, operationList);
break;
default:
new HostXml_9(defaultHostControllerName, runningMode, isCachedDc, extensionRegistry, extensionXml, readerNS).readElement(reader, operationList);
break;
}
}
代码示例来源:origin: wildfly/wildfly-core
throws XMLStreamException {
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
switch (readerNS.getMajorVersion()) {
case 1:
case 2:
代码示例来源:origin: wildfly/wildfly-core
@Override
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> nodes) throws XMLStreamException {
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
switch (readerNS.getMajorVersion()) {
case 1:
case 2:
代码示例来源:origin: wildfly/wildfly-core
throws XMLStreamException {
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
switch (readerNS.getMajorVersion()) {
case 1:
case 2:
内容来源于网络,如有侵权,请联系作者删除!