Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.osgi.application
Class ApplicationLoader

java.lang.Object
  extended by org.nuxeo.osgi.application.ApplicationLoader
Direct Known Subclasses:
StandaloneBundleLoader

public abstract class ApplicationLoader
extends Object

Author:
Bogdan Stefanescu

Nested Class Summary
 class ApplicationLoader.BundleFileLoader
           
 class ApplicationLoader.BundleFileScanner
           
 class ApplicationLoader.BundleInstaller
          Installs bundles as they are discovered by the bundle visitor.
 class ApplicationLoader.DefaultCallback
           
 
Method Summary
 boolean getExtractNestedJARs()
           
 File getNestedBundleDirectory()
           
 OSGiAdapter getOSGi()
           
 FileNamePattern[] getPatterns()
           
 boolean getScanForNestedJARs()
           
 void install(File root)
          Installs all bundles found in the given directory.
 void installAll(Collection<BundleFile> bundleFiles)
          Installs all given bundle deployments.
abstract  void installBundle(BundleFile bundleFile)
           
 void load(File root, List<BundleFile> bundles, List<BundleFile> jars)
          Scans and loads the given directory for OSGi bundles and regular JARs and fills the given lists appropriately.
abstract  void loadBundle(BundleFile bundleFile)
           
abstract  void loadJAR(BundleFile bundleFile)
           
 void scan(File root, List<BundleFile> bundles, List<BundleFile> ljars)
          Scans the given directory for OSGi bundles and regular JARs and fills the given lists appropriately.
 void setExtractNestedJARs(boolean extractNestedJARs)
           
 void setPatterns(FileNamePattern[] patterns)
           
 void setScanForNestedJARs(boolean scanForNestedJARs)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

installBundle

public abstract void installBundle(BundleFile bundleFile)
                            throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

loadBundle

public abstract void loadBundle(BundleFile bundleFile)

loadJAR

public abstract void loadJAR(BundleFile bundleFile)

getNestedBundleDirectory

public File getNestedBundleDirectory()

getOSGi

public OSGiAdapter getOSGi()

setExtractNestedJARs

public void setExtractNestedJARs(boolean extractNestedJARs)

getExtractNestedJARs

public boolean getExtractNestedJARs()

setScanForNestedJARs

public void setScanForNestedJARs(boolean scanForNestedJARs)

getScanForNestedJARs

public boolean getScanForNestedJARs()

setPatterns

public void setPatterns(FileNamePattern[] patterns)

getPatterns

public FileNamePattern[] getPatterns()

load

public void load(File root,
                 List<BundleFile> bundles,
                 List<BundleFile> jars)
Scans and loads the given directory for OSGi bundles and regular JARs and fills the given lists appropriately.

Loading means registering with the given shared class loader each bundle found.

Parameters:
root - the directory to recursively scan
bundles - the list to fill with found bundles
jars - the list to fill with found jars

installAll

public void installAll(Collection<BundleFile> bundleFiles)
                throws org.osgi.framework.BundleException
Installs all given bundle deployments.

Parameters:
bundleFiles -
Throws:
org.osgi.framework.BundleException

install

public void install(File root)
Installs all bundles found in the given directory.

The directory is recursively searched for bundles.

Parameters:
root - the tree root

scan

public void scan(File root,
                 List<BundleFile> bundles,
                 List<BundleFile> ljars)
Scans the given directory for OSGi bundles and regular JARs and fills the given lists appropriately.

Parameters:
root - the directory to recursively scan
bundles - the list to fill with found bundles
ljars - the list to fill with found jars

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.