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, ConfigListener
Resource 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 UnprocessedChangeEvents
changed(PropertyChangeEvent[] events)
Notification that @Configured objects that were injected have changedvoid
deployResources(String applicationName)
Deploys resources with a specified applicationvoid
deployResources(Collection<Resource> resources)
deploy resourcesResources
getResources(String applicationName)
Gets allResources
that are part of an applicationvoid
postConstruct()
void
preDestroy()
Do cleanup of system-resource-adapter, resources, poolsvoid
undeployResources(Resources resources)
undeploy the given set of resources
resources (bindable) are removed first and then the poolsvoid
undeployResources(String applicationName)
Undeploy all resources associated with a given application
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstruct
in interfaceorg.glassfish.hk2.api.PostConstruct
-
getResources
public Resources getResources(String applicationName)
Gets allResources
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 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:
changed
in interfaceConfigListener
- Parameters:
events
- list of changes- Returns:
- the list of unprocessed events (requiring a restart) or null if all reconfiguration was processed successfully
-
-