Class RepositoryListener

    • Field Detail

      • log

        protected static final org.apache.commons.logging.Log log
      • wsInfoList

        protected WSInfoList wsInfoList
        Reference to a WSInfoList
    • Constructor Detail

      • RepositoryListener

        public RepositoryListener​(DeploymentEngine deploymentEngine,
                                  boolean isClasspath)
        This constructor takes two arguments, a folder name and a reference to Deployment Engine First, it initializes the system, by loading all the modules in the /modules directory and then creates a WSInfoList to store information about available modules and services.
        Parameters:
        deploymentEngine - reference to engine registry for updates
        isClasspath - true if this RepositoryListener should scan the classpath for Modules
    • Method Detail

      • init2

        public void init2​(boolean isClasspath)
      • checkModules

        public void checkModules()
        Finds a list of modules in the folder and adds to wsInfoList.
      • isSourceControlDir

        protected boolean isSourceControlDir​(File file)
      • loadClassPathModules

        protected void loadClassPathModules()
      • getLocation

        protected String getLocation()
        To get the location of the Axis2.jar from that I can drive the location of class path
        Returns:
        String (location of the axis2 jar)
      • checkServices

        public void checkServices()
        Finds a list of services in the folder and adds to wsInfoList.
      • init

        public void init()
        First initializes the WSInfoList, then calls checkModule to load all the modules and calls update() to update the Deployment engine and engine registry.
      • findServicesInDirectory

        protected void findServicesInDirectory​(File root)
        Searches a given folder for aar files and adds them to a list in the WSInfolist class. If sub folders found, those are also searched for services. Ex : repository/services/foo/1.0.0/echo.aar repository/services/foo/1.0.1/echo.aar repository/services/echo.aar
        Parameters:
        root - - directory from which we start searching for services
      • startListener

        public void startListener()
        Method invoked from the scheduler to start the listener.
      • update

        public void update()
        Updates WSInfoList object.
      • addFileToDeploy

        public void addFileToDeploy​(File file,
                                    Deployer deployer,
                                    int type)
      • addURLToDeploy

        public void addURLToDeploy​(URL url,
                                   Deployer deployer,
                                   int type)