Examples of ResourceCache


Examples of com.sun.faces.application.resource.ResourceCache

        groovyHelper = GroovyHelper.getCurrentInstance();

        devModeEnabled = (appImpl.getProjectStage() == ProjectStage.Development);

        if (!devModeEnabled) {
            resourceCache = new ResourceCache();
        }

        resourceManager = new ResourceManager(appMap, resourceCache);
        namedEventManager = new NamedEventManager();
        applicationStateInfo = new ApplicationStateInfo();
View Full Code Here

Examples of com.sun.faces.application.resource.ResourceCache

            compiler = createCompiler(appMap, webConfig);
            faceletFactory = createFaceletFactory(compiler, webConfig);
        }

        if (!devModeEnabled) {
            resourceCache = new ResourceCache();
        }

        resourceManager = new ResourceManager(appMap, resourceCache);
        namedEventManager = new NamedEventManager();
        applicationStateInfo = new ApplicationStateInfo();
View Full Code Here

Examples of com.sun.faces.application.resource.ResourceCache

        groovyHelper = GroovyHelper.getCurrentInstance();

        devModeEnabled = (appImpl.getProjectStage() == ProjectStage.Development);

        if (!devModeEnabled) {
            resourceCache = new ResourceCache();
        }

        resourceManager = new ResourceManager(appMap, resourceCache);
        namedEventManager = new NamedEventManager();
        applicationStateInfo = new ApplicationStateInfo();
View Full Code Here

Examples of org.aperteworkflow.util.vaadin.ResourceCache

  public ActivityMainPane(Application application, I18NSource i18NSource, ProcessToolBpmSession bpmSession)
  {
    this.application = application;
    this.i18NSource = i18NSource;
    this.bpmSession = bpmSession;
    this.resourceCache = new ResourceCache(application);

    setWidth(100, Sizeable.UNITS_PERCENTAGE);
    initLayout();
  }
View Full Code Here

Examples of org.aperteworkflow.util.vaadin.ResourceCache

    protected void setUp(Application application, I18NSource messageSource, String title) {
        this.application = application;
        this.messageSource = messageSource;
        this.title = title;
    this.resourceCache = new ResourceCache(application);
    }
View Full Code Here

Examples of org.eclipse.jetty.server.ResourceCache

    public TemplateContext(String key, Server server,Resource baseResource, ClassLoader libLoader) throws IOException
    {
        _server=server;
        _baseResource=baseResource;
        _mimeTypes=new MimeTypes();
        _resourceCache=new ResourceCache(null,baseResource,_mimeTypes,false,false);
       
        String[] patterns = (String[])_server.getAttribute(WebAppContext.SERVER_SRV_CLASSES);
        _serverClasses=new ClasspathPattern(patterns==null?WebAppContext.__dftServerClasses:patterns);
        patterns = (String[])_server.getAttribute(WebAppContext.SERVER_SYS_CLASSES);
        _systemClasses=new ClasspathPattern(patterns==null?WebAppContext.__dftSystemClasses:patterns);
View Full Code Here

Examples of org.eclipse.jetty.server.ResourceCache

            if (instance_webapp.exists())
            {  
                context.setBaseResource(new ResourceCollection(instance_webapp,shared.getBaseResource()));

                // Create the resource cache
                ResourceCache cache = new ResourceCache(shared.getResourceCache(),instance_webapp,context.getMimeTypes(),false,false);
                context.setAttribute(ResourceCache.class.getCanonicalName(),cache);
            }
            else
            {
                context.setBaseResource(shared.getBaseResource());
View Full Code Here

Examples of org.eclipse.jetty.server.ResourceCache

       
        try
        {
            if (_cache==null && (max_cached_files!=-2 || max_cache_size!=-2 || max_cached_file_size!=-2))
            {
                _cache= new ResourceCache(null,this,_mimeTypes,_useFileMappedBuffer,_etags);

                if (max_cache_size>=0)
                    _cache.setMaxCacheSize(max_cache_size);
                if (max_cached_file_size>=-1)
                    _cache.setMaxCachedFileSize(max_cached_file_size);
View Full Code Here

Examples of org.eclipse.jetty.server.ResourceCache

       
        try
        {
            if (_cache==null && max_cached_files>0)
            {
                _cache= new ResourceCache(null,this,_mimeTypes,_useFileMappedBuffer,_etags);

                if (max_cache_size>0)
                    _cache.setMaxCacheSize(max_cache_size);
                if (max_cached_file_size>=-1)
                    _cache.setMaxCachedFileSize(max_cached_file_size);
View Full Code Here

Examples of org.mortbay.http.ResourceCache

        /*
         * Determine if the resource has already been found in a resource cache
         * (be it an extensions resource cache or the cores)
         */

        ResourceCache o = fullResourceCache ? null : (ResourceCache) resourceCacheMap.get(pathInContext);
        if (o == null) {

            /*
             * The existence of the resource has not yet been determined. Search
             * all resource caches in reverse until the extension is found. When
             * found, store which cache it was found in for quick look up in the
             * future.
             */
            if (log.isDebugEnabled())
                log.debug("Resource " + pathInContext + " not found in any resource cache, checking in plugins");

            for (Iterator i = reverseCaches.iterator(); i.hasNext();) {
                ResourceCache cache = (ResourceCache) i.next();
                r = cache.getResource(pathInContext);
                if (r != null && r.exists() && !r.isDirectory()) {
                    if (fullResourceCache) {
                        if (log.isDebugEnabled())
                            log.debug("    Found in " + cache.getBaseResource().toString());
                        cacheState.put(pathInContext, new CacheState(CacheState.FOUND, pathInContext, r));
                    } else {
                        if (log.isDebugEnabled())
                            log.debug("    Found in " + cache.getBaseResource().toString());
                        resourceCacheMap.put(pathInContext, cache);
                    }
                    return r;
                }
            }

            /*
             * The resource cannot be found in this caches base directory
             */
            if (log.isDebugEnabled())
                log.debug("   Not found");
        } else {
            /*
             * We know what cache the resource came from so check it still
             * exists and return. This will only happen when not in full cache
             * mode
             */
            r = o.getResource(pathInContext);
            if (r != null && r.exists() && !r.isDirectory()) {
                if (log.isDebugEnabled())
                    log.debug("    Found in " + o.getBaseResource().toString());
                return r;
            }
        }

        if (log.isDebugEnabled())
            log.debug("Checking for alias in plugins");
        String resourceAlias = getResourceAlias(pathInContext);
        if (resourceAlias != null) {

            /*
             * The resource was not found with its real name in any caches base
             * directory, so repeat the operation but look for the alias
             */

            if (log.isDebugEnabled())
                log.debug("    Found alias of " + resourceAlias + ", checking in plugins");
            for (Iterator i = reverseCaches.iterator(); i.hasNext();) {
                ResourceCache cache = (ResourceCache) i.next();
                r = cache.getResource(resourceAlias);

                /*
                 * When checking for resource modification, check for existence
                 * of file. This allows file to be removed at runtime without
                 * adding overhead when used on deployed server
                 */

                if (r != null && r.exists() && !r.isDirectory()) {
                    if (fullResourceCache) {
                        if (log.isDebugEnabled())
                            log.debug("    Found in " + cache.getBaseResource().toString());
                        cacheState.put(pathInContext, new CacheState(CacheState.FOUND, pathInContext, r));
                        return r;
                    } else {
                        if (log.isDebugEnabled())
                            log.debug("    Found in " + cache.getBaseResource().toString());
                        resourceCacheMap.put(pathInContext, cache);
                        return r;
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.