Nuxeo Enterprise Platform 5.4

org.nuxeo.osgi.application
Class ClassPath

java.lang.Object
  extended by org.nuxeo.osgi.application.ClassPath
All Implemented Interfaces:
ClassPathScanner.Callback

public class ClassPath
extends java.lang.Object
implements ClassPathScanner.Callback

Author:
Bogdan Stefanescu

Constructor Summary
ClassPath(SharedClassLoader loader, java.io.File nestedJARsDir)
           
 
Method Summary
 java.util.List<BundleFile> getBundles()
           
 java.util.List<BundleFile> getJars()
           
 java.util.List<BundleFile> getNestedJars()
           
 java.io.File handleBundle(BundleFile bf)
          A Bundle was found on the class path.
 java.io.File handleJar(BundleFile bf)
          A JAR was found on the class path.
 void handleNestedJar(BundleFile bf)
          A nested JAR was found on the class path.
 void restore(java.io.File file)
           
 void scan(java.util.List<java.io.File> files, boolean scanForNestedJARs, java.lang.String[] blacklist)
           
 void store(java.io.File file)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassPath

public ClassPath(SharedClassLoader loader,
                 java.io.File nestedJARsDir)
Method Detail

getBundles

public java.util.List<BundleFile> getBundles()

getJars

public java.util.List<BundleFile> getJars()

getNestedJars

public java.util.List<BundleFile> getNestedJars()

scan

public void scan(java.util.List<java.io.File> files,
                 boolean scanForNestedJARs,
                 java.lang.String[] blacklist)

handleBundle

public java.io.File handleBundle(BundleFile bf)
Description copied from interface: ClassPathScanner.Callback
A Bundle was found on the class path. Usually a callback should handle this by adding the Bundle to a class loader and installing it in an OSGi framework

The callback should return a directory to be used to extract nested JARs from this JAR.

The callback may return null to skip nested JAR extraction.

Specified by:
handleBundle in interface ClassPathScanner.Callback
Parameters:
bf - the JAR found
Returns:
the folder to be used to extract JARs or null to skip extraction

handleJar

public java.io.File handleJar(BundleFile bf)
Description copied from interface: ClassPathScanner.Callback
A JAR was found on the class path. Usually a callback should handle this by adding the JAR to a class loader.

The callback should return a directory to be used to extract nested JARs from this JAR.

The callback may return null to skip nested JAR extraction.

Specified by:
handleJar in interface ClassPathScanner.Callback
Parameters:
bf - the JAR found
Returns:
the folder to be used to extract JARs or null to skip extraction

handleNestedJar

public void handleNestedJar(BundleFile bf)
Description copied from interface: ClassPathScanner.Callback
A nested JAR was found on the class path. Usually a callback should handle this by adding the JAR to a class loader

The callback should return a directory to be used to extract nested JARs from this JAR.

The callback may return null to skip nested JAR extraction

Specified by:
handleNestedJar in interface ClassPathScanner.Callback
Parameters:
bf - the JAR found

store

public void store(java.io.File file)
           throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

restore

public void restore(java.io.File file)
             throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.