Java Code Examples for org.jboss.as.controller.parsing.ProfileParsingCompletionHandler

The following examples show how to use org.jboss.as.controller.parsing.ProfileParsingCompletionHandler. These examples are extracted from open source projects. 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 Project: ARCHIVE-wildfly-swarm   Source File: StandaloneXmlParser.java    License: 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 Project: thorntail   Source File: StandaloneXMLParser.java    License: 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
public Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers() {
    Set<ProfileParsingCompletionHandler> result = new HashSet<ProfileParsingCompletionHandler>();

    for (ExtensionInfo extensionInfo : extensions.values()) {
        //noinspection SynchronizationOnLocalVariableOrMethodParameter
        synchronized (extensionInfo) {
            if (extensionInfo.parsingCompletionHandler != null) {
                result.add(extensionInfo.parsingCompletionHandler);
            }
        }
    }
    return Collections.unmodifiableSet(result);
}
 
Example 4
@Override
public void setProfileParsingCompletionHandler(ProfileParsingCompletionHandler handler) {
    assert handler != null : "handler is null";
    synchronized (extension) {
        extension.parsingCompletionHandler = handler;
    }
}
 
Example 5
Source Project: thorntail   Source File: StandaloneXMLParserProducer.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void setProfileParsingCompletionHandler(ProfileParsingCompletionHandler profileParsingCompletionHandler) {
    // ignore
}
 
Example 6
@Override
public void setProfileParsingCompletionHandler(ProfileParsingCompletionHandler profileParsingCompletionHandler) {
    // ignore
}
 
Example 7
@Override
public Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers() {
    return extensionRegistry.getProfileParsingCompletionHandlers();
}
 
Example 8
Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers();