Class ResourceManager

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

    @RunLevel(value=2,
              mode=0)
    @Service(name="ResourceManager")
    public class ResourceManager
    extends Object
    implements org.glassfish.hk2.api.PostConstruct, org.glassfish.hk2.api.PreDestroy, ConfigListener
    Resource manager to bind various resources during start-up, create/update/delete of resource/pool
    Author:
    Jagadish Ramu
    • Constructor Detail

      • ResourceManager

        public ResourceManager()
    • Method Detail

      • postConstruct

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

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

        public Resources getAllResources()
      • 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​(Collection<Resource> resources)
        undeploy the given set of resources
        care has to be taken for the case of dependent resources
        eg : all resources need to be undeployed
        before undeploying the pool that they refer to
        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