Package org.jboss.gravia.runtime.spi

Examples of org.jboss.gravia.runtime.spi.ModuleEntriesProvider


            Manifest manifest = new Manifest(extensionURL.openStream());
            Dictionary<String, String> headers = new ManifestHeadersProvider(manifest).getHeaders();
            module = runtime.installModule(classLoader, headers);

            // Attach the {@link ModuleEntriesProvider} so
            ModuleEntriesProvider entriesProvider = new ClassLoaderEntriesProvider(module);
            Attachable attachable = AbstractModule.assertAbstractModule(module);
            attachable.putAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY, entriesProvider);

            // Start the module
            module.start();
View Full Code Here


    @Override
    public AbstractModule createModule(ClassLoader classLoader, Resource resource, Dictionary<String, String> headers, Attachable context) {
        AbstractModule module = super.createModule(classLoader, resource, headers, context);
        ServletContext servletContext = context.getAttachment(SERVLET_CONTEXT_KEY);
        if (servletContext != null) {
            ModuleEntriesProvider entriesProvider = new ServletContextEntriesProvider(servletContext);
            module.putAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY, entriesProvider);
        }
        return module;
    }
View Full Code Here

        return classLoader.getResources(name);
    }

    @Override
    public URL getEntry(String path) {
        ModuleEntriesProvider entriesProvider = module.adapt(ModuleEntriesProvider.class);
        return entriesProvider != null ? entriesProvider.getEntry(path) : null;
    }
View Full Code Here

        return entriesProvider != null ? entriesProvider.getEntry(path) : null;
    }

    @Override
    public Enumeration<String> getEntryPaths(String path) {
        ModuleEntriesProvider entriesProvider = module.adapt(ModuleEntriesProvider.class);
        Enumeration<String> result = null;
        if (entriesProvider != null) {
            List<String> paths = entriesProvider.getEntryPaths(path);
            if (paths.size() > 0) {
                Vector<String> vector = new Vector<String>(paths);
                result = vector.elements();
            }
        }
View Full Code Here

        return result;
    }

    @Override
    public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse) {
        ModuleEntriesProvider entriesProvider = module.adapt(ModuleEntriesProvider.class);
        Enumeration<URL> result = null;
        if (entriesProvider != null) {
            List<URL> paths = entriesProvider.findEntries(path, filePattern, recurse);
            if (paths.size() > 0) {
                Vector<URL> vector = new Vector<URL>(paths);
                result = vector.elements();
            }
        }
View Full Code Here

            Manifest manifest = new Manifest(extensionURL.openStream());
            Dictionary<String, String> headers = new ManifestHeadersProvider(manifest).getHeaders();
            module = runtime.installModule(classLoader, headers);

            // Attach the {@link ModuleEntriesProvider} so
            ModuleEntriesProvider entriesProvider = new ClassLoaderEntriesProvider(module);
            Attachable attachable = AbstractModule.assertAbstractModule(module);
            attachable.putAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY, entriesProvider);

            // Start the module
            module.start();
View Full Code Here

        return classLoader.getResources(name);
    }

    @Override
    public URL getEntry(String path) {
        ModuleEntriesProvider entriesProvider = module.adapt(ModuleEntriesProvider.class);
        return entriesProvider != null ? entriesProvider.getEntry(path) : null;
    }
View Full Code Here

        return entriesProvider != null ? entriesProvider.getEntry(path) : null;
    }

    @Override
    public Enumeration<String> getEntryPaths(String path) {
        ModuleEntriesProvider entriesProvider = module.adapt(ModuleEntriesProvider.class);
        Enumeration<String> result = null;
        if (entriesProvider != null) {
            List<String> paths = entriesProvider.getEntryPaths(path);
            if (paths.size() > 0) {
                Vector<String> vector = new Vector<String>(paths);
                result = vector.elements();
            }
        }
View Full Code Here

        return result;
    }

    @Override
    public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse) {
        ModuleEntriesProvider entriesProvider = module.adapt(ModuleEntriesProvider.class);
        Enumeration<URL> result = null;
        if (entriesProvider != null) {
            List<URL> paths = entriesProvider.findEntries(path, filePattern, recurse);
            if (paths.size() > 0) {
                Vector<URL> vector = new Vector<URL>(paths);
                result = vector.elements();
            }
        }
View Full Code Here

            Manifest manifest = new Manifest(url.openStream());
            Dictionary<String, String> headers = new ManifestHeadersProvider(manifest).getHeaders();
            module = runtime.installModule(classLoader, headers);

            // Attach the {@link ModuleEntriesProvider} so
            ModuleEntriesProvider entriesProvider = new ClassLoaderEntriesProvider(module);
            Attachable attachable = AbstractModule.assertAbstractModule(module);
            attachable.putAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY, entriesProvider);

            // Start the module
            module.start();
View Full Code Here

TOP

Related Classes of org.jboss.gravia.runtime.spi.ModuleEntriesProvider

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.