Package org.jboss.gravia.resource.spi

Examples of org.jboss.gravia.resource.spi.AttachableSupport


        if (manifest != null) {
            headers = new ManifestHeadersProvider(manifest).getHeaders();
        }

        // Initialize the module install context
        AttachableSupport context = new AttachableSupport();
        context.putAttachment(WildFlyRuntime.DEPLOYMENT_ROOT_KEY, deploymentRoot);

        // Install the module
        ModuleClassLoader classLoader = depUnit.getAttachment(Attachments.MODULE).getClassLoader();
        try {
            Runtime runtime = RuntimeLocator.getRequiredRuntime();
View Full Code Here


        this.servletContext = servletContext;
    }

    @Override
    public Runtime createRuntime(PropertiesProvider propertiesProvider) {
        AttachableSupport context = new AttachableSupport();
        context.putAttachment(WebAppContextListener.SERVLET_CONTEXT_KEY, servletContext);
        return new TomcatRuntime(propertiesProvider, context);
    }
View Full Code Here

    }

    @Override
    public final Module installModule(ClassLoader classLoader, Resource resource, Dictionary<String, String> headers, Attachable context) throws ModuleException {

        context = context != null ? context : new AttachableSupport();
        AbstractModule module = createModule(classLoader, resource, headers, context);

        // Attach the {@link ModuleEntriesProvider}
        ModuleEntriesProvider entriesProvider = context.getAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY);
        entriesProvider = entriesProvider != null ? entriesProvider : getDefaultEntriesProvider(module, context);
View Full Code Here

        ResourceBuilder resbuilder = new ManifestResourceBuilder().load(manifest);
        if (resbuilder.isValid() == false)
            return null;

        AttachableSupport context = new AttachableSupport();
        context.putAttachment(TomcatRuntime.SERVLET_CONTEXT_KEY, servletContext);

        Module module;
        try {
            Resource resource = resbuilder.getResource();
            ManifestHeadersProvider headersProvider = new ManifestHeadersProvider(manifest);
View Full Code Here

    @Override
    public final Module installModule(ClassLoader classLoader, Resource resource, Dictionary<String, String> headers, Attachable context) throws ModuleException {
        assertNoShutdown();

        context = context != null ? context : new AttachableSupport();
        AbstractModule module = createModule(classLoader, resource, headers, context);

        // Attach the {@link ModuleEntriesProvider}
        ModuleEntriesProvider entriesProvider = context.getAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY);
        entriesProvider = entriesProvider != null ? entriesProvider : getDefaultEntriesProvider(module, context);
View Full Code Here

    }

    @Override
    public final Module installModule(ClassLoader classLoader, Resource resource, Dictionary<String, String> headers, Attachable context) throws ModuleException {

        Attachable appcontext = context != null ? context : new AttachableSupport();
        AbstractModule module = createModule(classLoader, resource, headers, appcontext);
        if (getModule(module.getIdentity()) != null)
            throw new ModuleException("Module already installed: " + module);

        modules.put(module.getModuleId(), module);
View Full Code Here

        this.servletContext = servletContext;
    }

    @Override
    public Runtime createRuntime(PropertiesProvider propertiesProvider) {
        AttachableSupport context = new AttachableSupport();
        context.putAttachment(WebAppContextListener.SERVLET_CONTEXT_KEY, servletContext);
        return new TomcatRuntime(propertiesProvider, context);
    }
View Full Code Here

    @Override
    public final Module installModule(ClassLoader classLoader, Resource resource, Dictionary<String, String> headers, Attachable context) throws ModuleException {
        assertNoShutdown();

        context = context != null ? context : new AttachableSupport();
        AbstractModule module = createModule(classLoader, resource, headers, context);

        // Attach the {@link ModuleEntriesProvider}
        ModuleEntriesProvider entriesProvider = context.getAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY);
        entriesProvider = entriesProvider != null ? entriesProvider : getDefaultEntriesProvider(module, context);
View Full Code Here

    @Override
    public final Module installModule(ClassLoader classLoader, Resource resource, Dictionary<String, String> headers, Attachable context) throws ModuleException {
        assertNoShutdown();

        context = context != null ? context : new AttachableSupport();
        AbstractModule module = createModule(classLoader, resource, headers, context);

        // Attach the {@link ModuleEntriesProvider}
        ModuleEntriesProvider entriesProvider = context.getAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY);
        entriesProvider = entriesProvider != null ? entriesProvider : getDefaultEntriesProvider(module, context);
View Full Code Here

        String contextPath = servletContext.getContextPath();
        Resource association = NamedResourceAssociation.getResource(contextPath);
        resource = association != null ? association : resource;

        AttachableSupport context = new AttachableSupport();
        context.putAttachment(SERVLET_CONTEXT_KEY, servletContext);

        Module module;
        try {
            Runtime runtime = RuntimeLocator.getRequiredRuntime();
            ClassLoader classLoader = servletContext.getClassLoader();
View Full Code Here

TOP

Related Classes of org.jboss.gravia.resource.spi.AttachableSupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.