Java Code Examples for org.jboss.staxmapper.XMLExtendedStreamReader#discardRemainder()

The following examples show how to use org.jboss.staxmapper.XMLExtendedStreamReader#discardRemainder() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StandaloneXmlParser.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 6 votes vote down vote up
public StandaloneXmlParser() {

        parserDelegate = new StandaloneXml(new ExtensionHandler() {
            @Override
            public void parseExtensions(XMLExtendedStreamReader reader, ModelNode address, Namespace namespace, List<ModelNode> list) throws XMLStreamException {
                reader.discardRemainder(); // noop
            }

            @Override
            public Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers() {
                return Collections.EMPTY_SET;
            }

            @Override
            public void writeExtensions(XMLExtendedStreamWriter writer, ModelNode modelNode) throws XMLStreamException {
                // noop
            }
        }, ParsingOption.IGNORE_SUBSYSTEM_FAILURES);

        xmlMapper = XMLMapper.Factory.create();
        xmlMapper.registerRootElement(new QName("urn:jboss:domain:4.0", "server"), parserDelegate);

    }
 
Example 2
Source File: StandaloneXMLParser.java    From thorntail with Apache License 2.0 5 votes vote down vote up
public StandaloneXMLParser() {
    ExtensionRegistry extensionRegistry = new ExtensionRegistry(
            ProcessType.SELF_CONTAINED,
            new RunningModeControl(RunningMode.NORMAL),
            null,
            null,
            null,
            RuntimeHostControllerInfoAccessor.SERVER
    );
    DeferredExtensionContext deferredExtensionContext =
        new DeferredExtensionContext(new BootModuleLoader(), extensionRegistry, Executors.newSingleThreadExecutor());
    parserDelegate = new StandaloneXml(
        new ExtensionHandler() {
            @Override
            public void parseExtensions(XMLExtendedStreamReader reader, ModelNode address, Namespace namespace, List<ModelNode> list) throws XMLStreamException {
                reader.discardRemainder(); // noop
            }

            @Override
            public Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers() {
                return Collections.emptySet();
            }

            @Override
            public void writeExtensions(XMLExtendedStreamWriter writer, ModelNode modelNode) throws XMLStreamException {
                // noop
            }
        },
        deferredExtensionContext,
        ParsingOption.IGNORE_SUBSYSTEM_FAILURES);

    xmlMapper = XMLMapper.Factory.create();

    addDelegate(new QName(Namespace.CURRENT.getUriString(), SERVER), parserDelegate);
    addDelegate(new QName("urn:jboss:domain:4.1", SERVER), parserDelegate);
    addDelegate(new QName("urn:jboss:domain:4.0", SERVER), parserDelegate);
    addDelegate(new QName("urn:jboss:domain:2.0", SERVER), parserDelegate);
}
 
Example 3
Source File: StandaloneXml_12.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 4
Source File: StandaloneXml_7.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 5
Source File: StandaloneXml_10.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 6
Source File: StandaloneXml_11.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 7
Source File: StandaloneXml_5.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 8
Source File: StandaloneXml_4.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 9
Source File: StandaloneXml_6.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 10
Source File: StandaloneXml_13.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 11
Source File: StandaloneXml_14.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 12
Source File: StandaloneXml_8.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 13
Source File: StandaloneXml_Legacy.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 14
Source File: StandaloneXml_9.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void parseNativeRemotingManagementInterface(final XMLExtendedStreamReader reader, final ModelNode address,
                                                    final List<ModelNode> list) throws XMLStreamException {

    requireNoAttributes(reader);
    //requireNoContent(reader);

    final ModelNode connector = new ModelNode();
    connector.get(OP).set(ADD);
    ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_REMOTING_INTERFACE);
    connector.get(OP_ADDR).set(operationAddress);
    list.add(connector);

    reader.discardRemainder();
}
 
Example 15
Source File: StandaloneXMLParser.java    From thorntail with Apache License 2.0 4 votes vote down vote up
@Override
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> modelNode) throws XMLStreamException {
    //System.out.println("Skip " + reader.getNamespaceURI() + "::" + reader.getLocalName());
    reader.discardRemainder();
}
 
Example 16
Source File: StandaloneXmlParser.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Override
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> modelNode) throws XMLStreamException {
    System.out.println("Skip " + reader.getNamespaceURI() + "::" + reader.getLocalName());
    reader.discardRemainder();
}