org.apache.webbeans.spi
Interface ScannerService


public interface ScannerService

This SPI is for abstracting the class scanning.

In a production environment Many different modules need to perform class scanning (EJB, JSF, JPA, ...). This SPI allows us to only have one central class scanner for the whole application server which only performs the scanning once at startup of each WebApp.

All URL path Strings in this interface contain the the protocol, e.g. 'file:/...' we get directly from URL.toExternalForm()


Method Summary
 Set<String> getAllAnnotations(String className)
           
 BDABeansXmlScanner getBDABeansXmlScanner()
          Gets BDABeansXMLScanner used to determine the beans.xml modifiers (interceptors, decorators, and, alternatives) that are enabled per BDA.
 Set<Class<?>> getBeanClasses()
          Gets beans classes that are found in the deployment archives.
 Set<URL> getBeanXmls()
          Gets xml configuration files that are occured in the deployment archives.
 void init(Object object)
          Any initializtion action that is required by the implementors.
 boolean isBDABeansXmlScanningEnabled()
          Indicates if BDABeansXmlScanner is available.
 void release()
          This method will get called once the information found by the current scan is not needed anymore and the ScannerService might free up resources.
 void scan()
          Perform the actual class scanning.
 

Method Detail

init

void init(Object object)
Any initializtion action that is required by the implementors.

Parameters:
object - initialization object

scan

void scan()
Perform the actual class scanning.


release

void release()
This method will get called once the information found by the current scan is not needed anymore and the ScannerService might free up resources.


getBeanXmls

Set<URL> getBeanXmls()
Gets xml configuration files that are occured in the deployment archives.

Returns:
the URL of the beans.xml files.

getBeanClasses

Set<Class<?>> getBeanClasses()
Gets beans classes that are found in the deployment archives.

Returns:
bean classes

getAllAnnotations

Set<String> getAllAnnotations(String className)
Parameters:
className -
Returns:
all Annotations used in the whole class

isBDABeansXmlScanningEnabled

boolean isBDABeansXmlScanningEnabled()
Indicates if BDABeansXmlScanner is available. This method should only return true if a BDABeansXmlScanner is implemented and the OpenWebBeansConfiguration.USE_BDA_BEANSXML_SCANNER custom property is set to true.

Returns:
T - BDABeansXmlScanner is available and enabled; F - No BDABeansXmlScanner is available or it is disabled

getBDABeansXmlScanner

BDABeansXmlScanner getBDABeansXmlScanner()
Gets BDABeansXMLScanner used to determine the beans.xml modifiers (interceptors, decorators, and, alternatives) that are enabled per BDA. This is different from the default behavior that enables modifiers per application and not just in one BDA contained in an application.

Returns:
null or reference to BDABeansXMLScanner


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.