FileDocCategorySizeDatePackage
ScannerFactory.javaAPI DocGlassfish v2 API3949Fri May 04 22:31:32 BST 2007com.sun.enterprise.deployment.annotation.factory

ScannerFactory

public class ScannerFactory extends Object
The Factory is reponsible for creating Scanner.
author
Shing Wai Chan

Fields Summary
Constructors Summary
private ScannerFactory()

    
Methods Summary
public static com.sun.enterprise.deployment.annotation.ScannercreateScanner(com.sun.enterprise.deployment.BundleDescriptor bundleDesc, com.sun.enterprise.deployment.archivist.Archivist archivist, com.sun.enterprise.deployment.deploy.shared.AbstractArchive abstractArchive, java.lang.ClassLoader classLoader)

        Scanner scanner = null;
        File f = new File(abstractArchive.getArchiveUri());

        if (ModuleType.EJB.equals(archivist.getModuleType())) {
            scanner = new EjbJarScanner(f, (EjbBundleDescriptor)bundleDesc,
                   classLoader);
        } else if (ModuleType.WAR.equals(archivist.getModuleType())) {
            scanner = new WarScanner(f, (WebBundleDescriptor)bundleDesc,
                   classLoader);
        } else if (ModuleType.CAR.equals(archivist.getModuleType())) {
            ApplicationClientDescriptor appClientDesc =
                    (ApplicationClientDescriptor)bundleDesc;

            scanner = new AppClientScanner(f, appClientDesc, classLoader);
        }

        return scanner;