Class ScanningAppProvider

  • All Implemented Interfaces:
    AppProvider, org.eclipse.jetty.util.component.LifeCycle
    Direct Known Subclasses:
    WebAppProvider

    @ManagedObject("Abstract Provider for loading webapps")
    public abstract class ScanningAppProvider
    extends org.eclipse.jetty.util.component.AbstractLifeCycle
    implements AppProvider
    • Constructor Detail

      • ScanningAppProvider

        protected ScanningAppProvider()
      • ScanningAppProvider

        protected ScanningAppProvider​(FilenameFilter filter)
    • Method Detail

      • setFilenameFilter

        protected void setFilenameFilter​(FilenameFilter filter)
      • getDeployedApps

        protected Map<String,​App> getDeployedApps()
        Returns:
        The index of currently deployed applications.
      • createApp

        protected App createApp​(String filename)
        Called by the Scanner.DiscreteListener to create a new App object. Isolated in a method so that it is possible to override the default App object for specialized implementations of the AppProvider.
        Parameters:
        filename - The file that is the context.xml. It is resolved by Resource.newResource(String)
        Returns:
        The App object for this particular context definition file.
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.eclipse.jetty.util.component.AbstractLifeCycle
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Overrides:
        doStop in class org.eclipse.jetty.util.component.AbstractLifeCycle
        Throws:
        Exception
      • exists

        protected boolean exists​(String path)
      • getDeploymentManager

        public DeploymentManager getDeploymentManager()
        Get the deploymentManager.
        Returns:
        the deploymentManager
      • getMonitoredDirResource

        public org.eclipse.jetty.util.resource.Resource getMonitoredDirResource()
      • getMonitoredDirName

        public String getMonitoredDirName()
      • getScanInterval

        @ManagedAttribute("scanning interval to detect changes which need reloaded")
        public int getScanInterval()
      • isRecursive

        @ManagedAttribute("recursive scanning supported")
        public boolean isRecursive()
      • setMonitoredResources

        public void setMonitoredResources​(List<org.eclipse.jetty.util.resource.Resource> resources)
      • getMonitoredResources

        public List<org.eclipse.jetty.util.resource.Resource> getMonitoredResources()
      • setMonitoredDirResource

        public void setMonitoredDirResource​(org.eclipse.jetty.util.resource.Resource resource)
      • addScannerListener

        public void addScannerListener​(org.eclipse.jetty.util.Scanner.Listener listener)
      • setMonitoredDirName

        public void setMonitoredDirName​(String dir)
        Parameters:
        dir - Directory to scan for context descriptors or war files
      • setMonitoredDirectories

        public void setMonitoredDirectories​(Collection<String> directories)
      • setRecursive

        protected void setRecursive​(boolean recursive)
      • setScanInterval

        public void setScanInterval​(int scanInterval)