Class ArchiveFactoryImpl

  • All Implemented Interfaces:
    ArchiveFactory

    public class ArchiveFactoryImpl
    extends java.lang.Object
    implements ArchiveFactory
    This class is written to deal with various URLs that can be returned by PersistenceUnitInfo.getPersistenceUnitRootUrl()
    Author:
    [email protected]
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.logging.Logger logger  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Archive createArchive​(java.net.URL rootUrl, java.lang.String descriptorLocation, java.util.Map properties)
      Return an instance of an implementer of Archive that can process the URL provided This instance will allow access to the persistence descriptor associated with this archive through the getDescriptorStream() method
      Archive createArchive​(java.net.URL rootUrl, java.util.Map properties)
      Return an instance of an implementer of Archive that can process the URL provided
      protected boolean isJarInputStream​(java.net.URL url)
      This method is called for a URL which has neither jar nor file protocol.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        protected java.util.logging.Logger logger
    • Constructor Detail

      • ArchiveFactoryImpl

        public ArchiveFactoryImpl()
      • ArchiveFactoryImpl

        public ArchiveFactoryImpl​(java.util.logging.Logger logger)
    • Method Detail

      • createArchive

        public Archive createArchive​(java.net.URL rootUrl,
                                     java.util.Map properties)
                              throws java.net.URISyntaxException,
                                     java.io.IOException
        Description copied from interface: ArchiveFactory
        Return an instance of an implementer of Archive that can process the URL provided
        Specified by:
        createArchive in interface ArchiveFactory
        Throws:
        java.net.URISyntaxException
        java.io.IOException
      • createArchive

        public Archive createArchive​(java.net.URL rootUrl,
                                     java.lang.String descriptorLocation,
                                     java.util.Map properties)
                              throws java.net.URISyntaxException,
                                     java.io.IOException
        Description copied from interface: ArchiveFactory
        Return an instance of an implementer of Archive that can process the URL provided This instance will allow access to the persistence descriptor associated with this archive through the getDescriptorStream() method
        Specified by:
        createArchive in interface ArchiveFactory
        Throws:
        java.net.URISyntaxException
        java.io.IOException
      • isJarInputStream

        protected boolean isJarInputStream​(java.net.URL url)
                                    throws java.io.IOException
        This method is called for a URL which has neither jar nor file protocol. This attempts to find out if we can treat it as a URL from which a JAR format InputStream can be obtained.
        Parameters:
        url -
        Throws:
        java.io.IOException