Class ResourceManager
- java.lang.Object
-
- org.glassfish.resourcebase.resources.listener.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, ConfigListenerResource manager to bind various resources during start-up, create/update/delete of resource/pool- Author:
- Jagadish Ramu
-
-
Field Summary
Fields Modifier and Type Field Description static StringLOGGERstatic StringLOGMESSAGE_RESOURCE
-
Constructor Summary
Constructors Constructor Description ResourceManager()
-
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(Collection<Resource> resources)deploy resourcesResourcesgetAllResources()voidpostConstruct()voidpreDestroy()Do cleanup of system-resource-adapter, resources, poolsvoidundeployResources(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
-
-
-
Field Detail
-
LOGMESSAGE_RESOURCE
public static final String LOGMESSAGE_RESOURCE
- See Also:
- Constant Field Values
-
LOGGER
public static final String LOGGER
- See Also:
- Constant Field Values
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.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:
preDestroyin interfaceorg.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:
changedin interfaceConfigListener- Parameters:
events- list of changes- Returns:
- the list of unprocessed events (requiring a restart) or null if all reconfiguration was processed successfully
-
-