Class ApplicationScopedResourcesManager

  • All Implemented Interfaces:
    org.glassfish.hk2.api.PostConstruct, org.glassfish.hk2.api.PreDestroy, ConfigListener

    @RunLevel(value=20,
              mode=0)
    @Service(name="ApplicationScopedResourcesManager")
    public class ApplicationScopedResourcesManager
    extends Object
    implements org.glassfish.hk2.api.PostConstruct, org.glassfish.hk2.api.PreDestroy, ConfigListener
    Resource manager to bind various application or module scoped resources during startup, create/update/delete of resource/pool
    Author:
    Jagadish Ramu
    • Constructor Detail

      • ApplicationScopedResourcesManager

        public ApplicationScopedResourcesManager()
    • Method Detail

      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • getResources

        public Resources getResources​(String applicationName)
        Gets all Resources that are part of an application
        Parameters:
        applicationName -
        Returns:
      • deployResources

        public void deployResources​(String applicationName)
        Deploys resources with a specified application
        Parameters:
        applicationName -
        See Also:
        deployResources(Collection)
      • deployResources

        public void deployResources​(Collection<Resource> resources)
        deploy resources
        Parameters:
        resources - list
      • preDestroy

        public void preDestroy()
        Do cleanup of system-resource-adapter, resources, pools
        Specified by:
        preDestroy in interface org.glassfish.hk2.api.PreDestroy
      • undeployResources

        public void undeployResources​(String applicationName)
        Undeploy all resources associated with a given application
        Parameters:
        applicationName -
      • undeployResources

        public void undeployResources​(Resources resources)
        undeploy the given set of resources
        resources (bindable) are removed first and then the pools
        Parameters:
        resources - list of resources
      • changed

        public UnprocessedChangeEvents changed​(PropertyChangeEvent[] events)
        Notification that @Configured objects that were injected have changed
        Specified by:
        changed in interface ConfigListener
        Parameters:
        events - list of changes
        Returns:
        the list of unprocessed events (requiring a restart) or null if all reconfiguration was processed successfully