Class ArchiveFactory

java.lang.Object
com.sun.enterprise.deploy.shared.ArchiveFactory

@Service @Singleton public class ArchiveFactory extends Object
This implementation of the ArchiveFactory interface is capable of creating the right abstraction of the Archive interface depending on the protocol used in the URL.
Author:
Jerome Dochez
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.glassfish.api.deployment.archive.WritableArchive
     
    org.glassfish.api.deployment.archive.WritableArchive
    createArchive(String protocol, File path)
     
    org.glassfish.api.deployment.archive.WritableArchive
    createArchive(String protocol, URI path)
     
    org.glassfish.api.deployment.archive.WritableArchive
    Creates a new archivist using the URL as the path.
    org.glassfish.api.deployment.archive.ReadableArchive
     
    org.glassfish.api.deployment.archive.ReadableArchive
    openArchive(File path, org.glassfish.api.deployment.DeployCommandParameters properties)
    It first consults ReadableArchiveFactory to get an archive, if it does not get then delegates to openArchive(java.net.URI).
    org.glassfish.api.deployment.archive.ReadableArchive
    Opens an existing archivist using the URL as the path.

    Methods inherited from class java.lang.Object

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

    • deplLogger

      public static final Logger deplLogger
  • Constructor Details

    • ArchiveFactory

      public ArchiveFactory()
  • Method Details

    • createArchive

      public org.glassfish.api.deployment.archive.WritableArchive createArchive(File path) throws IOException
      Throws:
      IOException
    • createArchive

      public org.glassfish.api.deployment.archive.WritableArchive createArchive(String protocol, File path) throws IOException
      Throws:
      IOException
    • openArchive

      public org.glassfish.api.deployment.archive.ReadableArchive openArchive(File path) throws IOException
      Throws:
      IOException
    • createArchive

      public org.glassfish.api.deployment.archive.WritableArchive createArchive(URI path) throws IOException
      Creates a new archivist using the URL as the path. The URL protocol will define the type of desired archive (jar, file, etc)
      Parameters:
      path - to the archive
      Returns:
      the apropriate archive
      Throws:
      IOException
    • createArchive

      public org.glassfish.api.deployment.archive.WritableArchive createArchive(String protocol, URI path) throws IOException
      Throws:
      IOException
    • openArchive

      public org.glassfish.api.deployment.archive.ReadableArchive openArchive(File path, org.glassfish.api.deployment.DeployCommandParameters properties) throws IOException
      It first consults ReadableArchiveFactory to get an archive, if it does not get then delegates to openArchive(java.net.URI).
      Parameters:
      path - Application archive, never null
      properties - property bag, can contain for example deploy time properties. Never null
      Returns:
      Gives ReadableArchive.
      Throws:
      IOException
    • openArchive

      public org.glassfish.api.deployment.archive.ReadableArchive openArchive(URI path) throws IOException
      Opens an existing archivist using the URL as the path. The URL protocol will defines the type of desired archive (jar, file, memory, etc...)
      Parameters:
      path - url to the existing archive
      Returns:
      the appropriate archive
      Throws:
      IOException