Package org.eclipse.jetty.deploy

Examples of org.eclipse.jetty.deploy.App


     *            {@link Resource#newResource(String)}
     * @return The App object for this particular context definition file.
     */
    protected App createApp(String filename)
    {
        return new App(_deploymentManager,this,filename);
    }
View Full Code Here


    /* ------------------------------------------------------------ */
    protected void fileAdded(String filename) throws Exception
    {
        if (LOG.isDebugEnabled())
            LOG.debug("added {}",filename);
        App app = ScanningAppProvider.this.createApp(filename);
        if (app != null)
        {
            _appMap.put(filename,app);
            _deploymentManager.addApp(app);
        }
View Full Code Here

    /* ------------------------------------------------------------ */
    protected void fileChanged(String filename) throws Exception
    {
        if (LOG.isDebugEnabled())
            LOG.debug("changed {}",filename);
        App app = _appMap.remove(filename);
        if (app != null)
        {
            _deploymentManager.removeApp(app);
        }
        app = ScanningAppProvider.this.createApp(filename);
View Full Code Here

    /* ------------------------------------------------------------ */
    protected void fileRemoved(String filename) throws Exception
    {
        if (LOG.isDebugEnabled())
            LOG.debug("removed {}",filename);
        App app = _appMap.remove(filename);
        if (app != null)
            _deploymentManager.removeApp(app);
    }
View Full Code Here

            Template template=templates.get(instance.getTemplateName());
            instance.setTemplate(template);
            if (template!=null)
            {
                String key=instance.getInstanceKey();
                App app = _deployed.get(key);
                if (app==null)
                    deploy.add(instance);
                else
                    deployed.add(key);
            }
        }
       
        // Look for deployed apps that need to be undeployed
        List<String> undeploy = new ArrayList<String>();
        for (String key : _deployed.keySet())
        {
            if (!deployed.contains(key))
                undeploy.add(key);
        }
       
        // Do the undeploys
        for (String key : undeploy)
        {
            App app = _deployed.remove(key);
            if (app!=null)
            {
                __log.info("Undeploy {}",key);
                _deploymentManager.removeApp(app);
            }
        }
       
        // ready the deploys
        for (Instance instance : deploy)
        {
            String key=instance.getInstanceKey();
            OverlayedApp app = new OverlayedApp(_deploymentManager,this,key,instance);
            _deployed.put(key,app);
        }

        // Remove unused Shared stuff
        Set<String> sharedKeys = new HashSet<String>(_shared.keySet());
        for (OverlayedApp app : _deployed.values())
        {
            Instance instance = app.getInstance();
            sharedKeys.remove(instance.getSharedKey());
        }
        for (String sharedKey: sharedKeys)
        {
            __log.debug("Remove "+sharedKey);
View Full Code Here

       
        String watermark = (String)serviceRef.getProperty(OSGiWebappConstants.WATERMARK);
        if (watermark != null && !"".equals(watermark))
            return false//this service represents a contexthandler that will be deregistered as a service by another of our deployers
       
        App app = _serviceMap.remove(serviceRef);
        if (app != null)
        {
            getDeploymentManager().removeApp(app);
            return true;
        }
View Full Code Here

     *
     * @return true if this was a webapp we had deployed, false otherwise
     */
    public boolean bundleRemoved (Bundle bundle) throws Exception
    {
        App app = _bundleMap.remove(bundle);
        if (app != null)
        {
            getDeploymentManager().removeApp(app);
            return true;
        }
View Full Code Here

       
        String watermark = (String)serviceRef.getProperty(OSGiWebappConstants.WATERMARK);
        if (watermark != null && !"".equals(watermark))
            return false//this service represents a contexthandler that will be deregistered as a service by another of our deployers
       
        App app = _serviceMap.remove(serviceRef);
        if (app != null)
        {
            getDeploymentManager().removeApp(app);
            return true;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.deploy.App

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.