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

The following examples show how to use org.jboss.as.controller.parsing.ProfileParsingCompletionHandler. 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: ExtensionRegistry.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
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
Source File: ExtensionRegistry.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void setProfileParsingCompletionHandler(ProfileParsingCompletionHandler handler) {
    assert handler != null : "handler is null";
    synchronized (extension) {
        extension.parsingCompletionHandler = handler;
    }
}
 
Example #5
Source File: StandaloneXMLParserProducer.java    From thorntail with Apache License 2.0 4 votes vote down vote up
@Override
public void setProfileParsingCompletionHandler(ProfileParsingCompletionHandler profileParsingCompletionHandler) {
    // ignore
}
 
Example #6
Source File: AbstractParserFactory.java    From ARCHIVE-wildfly-swarm with Apache License 2.0 4 votes vote down vote up
@Override
public void setProfileParsingCompletionHandler(ProfileParsingCompletionHandler profileParsingCompletionHandler) {
    // ignore
}
 
Example #7
Source File: StandaloneXml.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers() {
    return extensionRegistry.getProfileParsingCompletionHandlers();
}
 
Example #8
Source File: ExtensionHandler.java    From wildfly-core with GNU Lesser General Public License v2.1 votes vote down vote up
Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers();