Package org.apache.webbeans.xml
Class DefaultBeanArchiveService
- java.lang.Object
-
- org.apache.webbeans.xml.DefaultBeanArchiveService
-
- All Implemented Interfaces:
BeanArchiveService
public class DefaultBeanArchiveService extends Object implements BeanArchiveService
Please note that this implementation is not thread safe.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.webbeans.spi.BeanArchiveService
BeanArchiveService.BeanArchiveInformation, BeanArchiveService.BeanDiscoveryMode
-
-
Constructor Summary
Constructors Constructor Description DefaultBeanArchiveService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DefaultBeanArchiveInformationcreateBeanArchiveInformation(String bdaUrl)This method exists for extensibility reasons.BeanArchiveService.BeanArchiveInformationgetBeanArchiveInformation(URL beanArchiveUrl)protected ElementgetBeansRootElement(InputStream xmlStream)Gets the root element of the parsed document.Set<URL>getRegisteredBeanArchives()protected StringgetTrimmedAttribute(Element element, String attributeName)protected BeanArchiveService.BeanArchiveInformationreadBeansXml(InputStream xmlStreamIn, String beansXmlLocation)Read the information from the given beans.xml and fill it into a BeanArchiveInformation instance.voidrelease()protected StringstripProtocol(String urlPath)Get rid of any protocol header from the url externalForm
-
-
-
Method Detail
-
getBeanArchiveInformation
public BeanArchiveService.BeanArchiveInformation getBeanArchiveInformation(URL beanArchiveUrl)
- Specified by:
getBeanArchiveInformationin interfaceBeanArchiveService
-
getRegisteredBeanArchives
public Set<URL> getRegisteredBeanArchives()
- Specified by:
getRegisteredBeanArchivesin interfaceBeanArchiveService
-
createBeanArchiveInformation
protected DefaultBeanArchiveInformation createBeanArchiveInformation(String bdaUrl)
This method exists for extensibility reasons.
-
stripProtocol
protected String stripProtocol(String urlPath)
Get rid of any protocol header from the url externalForm- Parameters:
urlPath-
-
readBeansXml
protected BeanArchiveService.BeanArchiveInformation readBeansXml(InputStream xmlStreamIn, String beansXmlLocation) throws IOException
Read the information from the given beans.xml and fill it into a BeanArchiveInformation instance.- Throws:
IOException
-
release
public void release()
- Specified by:
releasein interfaceBeanArchiveService
-
getBeansRootElement
protected Element getBeansRootElement(InputStream xmlStream) throws WebBeansException
Gets the root element of the parsed document.- Parameters:
xmlStream- parsed document- Returns:
- root element of the document
- Throws:
WebBeansException- if any runtime exception occurs
-
-