Class DefaultBeanArchiveService

  • All Implemented Interfaces:
    org.apache.webbeans.spi.BeanArchiveService

    public class DefaultBeanArchiveService
    extends Object
    implements org.apache.webbeans.spi.BeanArchiveService
    Please note that this implementation is not thread safe.
    • Constructor Detail

      • DefaultBeanArchiveService

        public DefaultBeanArchiveService()
    • Method Detail

      • getBeanArchiveInformation

        public org.apache.webbeans.spi.BeanArchiveService.BeanArchiveInformation getBeanArchiveInformation​(URL beanArchiveUrl)
        Specified by:
        getBeanArchiveInformation in interface org.apache.webbeans.spi.BeanArchiveService
      • getRegisteredBeanArchives

        public Set<URL> getRegisteredBeanArchives()
        Specified by:
        getRegisteredBeanArchives in interface org.apache.webbeans.spi.BeanArchiveService
      • stripProtocol

        protected String stripProtocol​(String urlPath)
        Get rid of any protocol header from the url externalForm
        Parameters:
        urlPath -
      • readBeansXml

        protected org.apache.webbeans.spi.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:
        release in interface org.apache.webbeans.spi.BeanArchiveService
      • 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
      • getTrimmedAttribute

        protected String getTrimmedAttribute​(Element element,
                                             String attributeName)
        Returns:
        the trimmed attribute value, or null if the attribute does not exist or the attribute is empty