org.ow2.petals.jbi.management.autoload
Class AutoLoaderServiceImpl

java.lang.Object
  extended by org.ow2.petals.jbi.management.autoload.AutoLoaderServiceImpl
All Implemented Interfaces:
AutoLoaderService

public class AutoLoaderServiceImpl
extends java.lang.Object
implements AutoLoaderService

This class is used to load automatically components which are placed in the "autoLoad" directory. It scans the directory periodically and check if new components are presents. The @ link InstallationServiceMBean} is called for each of those components. The whole process of installation is done (install + start) After being threat, the archives of the components are removed. A file "fileName.success" will be created if success A file "fileName.failed" will be created otherwise, containing the related exception

Author:
alouis

Field Summary
protected  DeploymentService deploymentService
           
protected  InstallationService installationService
           
protected  JMXService jmxService
           
protected  org.ow2.petals.util.LoggingUtil log
           
protected  SystemStateService systemStateService
           
 
Constructor Summary
AutoLoaderServiceImpl()
           
 
Method Summary
 void install(java.util.List<java.io.File> archiveFiles)
          Install the given list of files.
protected  void resolveJBIArtefactDependencies(java.util.List<java.io.File> archivesToUninstall)
          For each JBI artefact to uninstall, search the dependent artefacts and add them to the List if they are not already set.
protected  void start()
          Initialize the autoloader.
protected  void stop()
          Stop the autoload of the components.
 void uninstall(java.util.List<java.io.File> archiveFiles)
          Uninstall the given list of files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deploymentService

protected DeploymentService deploymentService

installationService

protected InstallationService installationService

jmxService

protected JMXService jmxService

log

protected org.ow2.petals.util.LoggingUtil log

systemStateService

protected SystemStateService systemStateService
Constructor Detail

AutoLoaderServiceImpl

public AutoLoaderServiceImpl()
Method Detail

install

public void install(java.util.List<java.io.File> archiveFiles)
Description copied from interface: AutoLoaderService
Install the given list of files.

Specified by:
install in interface AutoLoaderService
Parameters:
archiveFiles - the list of JBI archives

uninstall

public void uninstall(java.util.List<java.io.File> archiveFiles)
Description copied from interface: AutoLoaderService
Uninstall the given list of files.

Specified by:
uninstall in interface AutoLoaderService
Parameters:
archiveFiles - the list of JBI archives

resolveJBIArtefactDependencies

protected void resolveJBIArtefactDependencies(java.util.List<java.io.File> archivesToUninstall)
For each JBI artefact to uninstall, search the dependent artefacts and add them to the List if they are not already set.

Parameters:
filesToUninstall - The initial collection of files to uninstall

start

protected void start()
              throws java.io.IOException
Initialize the autoloader.

Throws:
java.io.IOException

stop

protected void stop()
Stop the autoload of the components. TODO : synchronization, does the autoload must wait before the end of an installation before closing?



Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.