Class BundleProvisioner.DefaultCustomizer

  • Enclosing class:
    BundleProvisioner

    public static class BundleProvisioner.DefaultCustomizer
    extends Object
    This is default implementation of BundleProvisioner.Customizer which uses the URI of the Jar as location. The default customizer uses following configuration properties:

    glassfish.osgi.auto.install:

    This contains white space delimited list of absolute URIs to be installed. If a URI represents a directory location, then it will be treated as if all the jar files from that directory location (non-recursive) were specified instead. Bundles will be installed in the same order they are specified.

    glassfish.osgi.auto.start: This contains white space delimited list of absolute URIs to be started. If a URI represents a directory location, then it will be treated as if all the jar files from that directory location (non-recursive) were specified instead. Although bundles will be started in the order they are specified in this list, their eventual activation order depends on start level and/or activation policy.

    glassfish.osgi.auto.start.level.N, where N is > 0 This contains list of bundle URIs to be started at start level N.

    glassfish.osgi.auto.start.option: This specifies the options used to start bundles. It is an integer and must confirm to the format accepted by Bundle.start(int) method. The default is to use Bundle.START_ACTIVATION_POLICY. It also means bundles will be started persistently by default. To start transiently, one has to specify explicitly.

    Author:
    [email protected]
    • Constructor Detail

      • DefaultCustomizer

        public DefaultCustomizer​(Properties config)
    • Method Detail

      • getAutoInstallLocations

        public List<URI> getAutoInstallLocations()
      • getAutoStartLocations

        public List<URI> getAutoStartLocations()
      • getStartOptions

        public int getStartOptions()
      • makeLocation

        public String makeLocation​(com.sun.enterprise.glassfish.bootstrap.osgi.Jar jar)
      • isDirectory

        protected boolean isDirectory​(URI uri)
        Is this URI a directory?
        Parameters:
        uri - URI to be checked
        Returns:
        true if this URI represents a directory, else false.
      • listJarFiles

        protected List<? extends URI> listJarFiles​(URI aDirectoryURI)
        Parameters:
        aDirectoryURI - uri corresponding to a directory location which will be searched.
        Returns:
        URIs corresponding to jar files in a given directory location.
      • isManaged

        public boolean isManaged​(com.sun.enterprise.glassfish.bootstrap.osgi.Jar jar)
      • getStartLevel

        public Integer getStartLevel​(com.sun.enterprise.glassfish.bootstrap.osgi.Jar jar)
      • getConfiguredAutoInstallLocations

        protected List<URI> getConfiguredAutoInstallLocations()