Class ScanningAppProvider

    • Constructor Detail

      • ScanningAppProvider

        protected ScanningAppProvider()
      • ScanningAppProvider

        protected ScanningAppProvider​(java.io.FilenameFilter filter)
    • Method Detail

      • isUseRealPaths

        public boolean isUseRealPaths()
        Returns:
        True if the real path of the scanned files should be used for deployment.
      • setUseRealPaths

        public void setUseRealPaths​(boolean useRealPaths)
        Parameters:
        useRealPaths - True if the real path of the scanned files should be used for deployment.
      • setFilenameFilter

        protected void setFilenameFilter​(java.io.FilenameFilter filter)
      • getDeployedApps

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

        protected App createApp​(java.lang.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 java.lang.Exception
        Description copied from class: ContainerLifeCycle
        Starts the managed lifecycle beans in the order they were added.
        Overrides:
        doStart in class ContainerLifeCycle
        Throws:
        AbstractLifeCycle.StopException - If thrown, the lifecycle will immediately be stopped.
        java.lang.Exception - If there was a problem starting. Will cause a transition to FAILED state
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Description copied from class: ContainerLifeCycle
        Stops the managed lifecycle beans in the reverse order they were added.
        Overrides:
        doStop in class ContainerLifeCycle
        Throws:
        java.lang.Exception - If there was a problem stopping. Will cause a transition to FAILED state
      • exists

        protected boolean exists​(java.lang.String path)
      • fileAdded

        protected void fileAdded​(java.lang.String filename)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • fileChanged

        protected void fileChanged​(java.lang.String filename)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • fileRemoved

        protected void fileRemoved​(java.lang.String filename)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDeploymentManager

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

        public Resource getMonitoredDirResource()
      • getMonitoredDirName

        public java.lang.String getMonitoredDirName()
      • getScanInterval

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

        public void setMonitoredResources​(java.util.List<Resource> resources)
      • getMonitoredResources

        public java.util.List<Resource> getMonitoredResources()
      • setMonitoredDirResource

        public void setMonitoredDirResource​(Resource resource)
      • addScannerListener

        public void addScannerListener​(Scanner.Listener listener)
      • setMonitoredDirName

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

        public void setMonitoredDirectories​(java.util.Collection<java.lang.String> directories)
      • setScanInterval

        public void setScanInterval​(int scanInterval)