Package org.glassfish.resources.listener
Class ApplicationScopedResourcesManager
- java.lang.Object
-
- org.glassfish.resources.listener.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, ConfigListenerResource manager to bind various application or module scoped resources during startup, create/update/delete of resource/pool- Author:
- Jagadish Ramu
-
-
Constructor Summary
Constructors Constructor Description ApplicationScopedResourcesManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnprocessedChangeEventschanged(PropertyChangeEvent[] events)Notification that @Configured objects that were injected have changedvoiddeployResources(String applicationName)Deploys resources with a specified applicationvoiddeployResources(Collection<Resource> resources)deploy resourcesResourcesgetResources(String applicationName)Gets allResourcesthat are part of an applicationvoidpostConstruct()voidpreDestroy()Do cleanup of system-resource-adapter, resources, poolsvoidundeployResources(Resources resources)undeploy the given set of resources
resources (bindable) are removed first and then the poolsvoidundeployResources(String applicationName)Undeploy all resources associated with a given application
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
getResources
public Resources getResources(String applicationName)
Gets allResourcesthat 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:
preDestroyin interfaceorg.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:
changedin interfaceConfigListener- Parameters:
events- list of changes- Returns:
- the list of unprocessed events (requiring a restart) or null if all reconfiguration was processed successfully
-
-