Class VfsProcessApplicationScanner

  • All Implemented Interfaces:
    ProcessApplicationScanner

    public class VfsProcessApplicationScanner
    extends java.lang.Object
    implements ProcessApplicationScanner

    A ProcessArchiveScanner which uses Jboss VFS for scanning the process archive for processes.

    This implementation should be used on WildFly

    Author:
    Daniel Meyer, Falko Menge
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader, java.lang.String resourceRootPath, java.net.URL processesXml)  
      java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader, java.lang.String resourceRootPath, java.net.URL processesXml, java.lang.String[] additionalResourceSuffixes)  
      protected org.jboss.vfs.VirtualFile getVirtualFileForUrl​(java.net.URL url)  
      protected java.util.Enumeration<java.net.URL> loadClasspathResourceRoots​(java.lang.ClassLoader classLoader, java.lang.String strippedPaResourceRootPath)  
      protected void scanRoot​(org.jboss.vfs.VirtualFile processArchiveRoot, java.lang.String[] additionalResourceSuffixes, java.util.Map<java.lang.String,​byte[]> resources)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VfsProcessApplicationScanner

        public VfsProcessApplicationScanner()
    • Method Detail

      • findResources

        public java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader,
                                                                          java.lang.String resourceRootPath,
                                                                          java.net.URL processesXml)
        Specified by:
        findResources in interface ProcessApplicationScanner
        Parameters:
        classLoader - the classloader to scan
        resourceRootPath - see ProcessArchiveXml.PROP_RESOURCE_ROOT_PATH
        processesXml - the URL to the META-INF/processes.xml file
        Returns:
        a Map of process definitions
      • findResources

        public java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader,
                                                                          java.lang.String resourceRootPath,
                                                                          java.net.URL processesXml,
                                                                          java.lang.String[] additionalResourceSuffixes)
        Specified by:
        findResources in interface ProcessApplicationScanner
        Parameters:
        classLoader - the classloader to scan
        resourceRootPath - see ProcessArchiveXml.PROP_RESOURCE_ROOT_PATH
        processesXml - the URL to the META-INF/processes.xml file
        additionalResourceSuffixes - a list of additional suffixes for resources
        Returns:
        a Map of process definitions
      • getVirtualFileForUrl

        protected org.jboss.vfs.VirtualFile getVirtualFileForUrl​(java.net.URL url)
      • scanRoot

        protected void scanRoot​(org.jboss.vfs.VirtualFile processArchiveRoot,
                                java.lang.String[] additionalResourceSuffixes,
                                java.util.Map<java.lang.String,​byte[]> resources)
      • loadClasspathResourceRoots

        protected java.util.Enumeration<java.net.URL> loadClasspathResourceRoots​(java.lang.ClassLoader classLoader,
                                                                                 java.lang.String strippedPaResourceRootPath)