org.glassfish.javaee.services
Class ResourceManager

java.lang.Object
  extended by org.glassfish.javaee.services.ResourceManager
All Implemented Interfaces:
PostStartup, org.jvnet.hk2.component.PostConstruct, org.jvnet.hk2.component.PreDestroy, org.jvnet.hk2.config.ConfigListener

@Scoped(value=org.jvnet.hk2.component.Singleton.class)
@Service(name="ResourceManager")
public class ResourceManager
extends Object
implements PostStartup, org.jvnet.hk2.component.PostConstruct, org.jvnet.hk2.component.PreDestroy, org.jvnet.hk2.config.ConfigListener

Resource manager to bind various resources during start-up, create/update/delete of resource/pool

Author:
Jagadish Ramu

Constructor Summary
ResourceManager()
           
 
Method Summary
 org.jvnet.hk2.config.UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
          Notification that @Configured objects that were injected have changed
 void deployResources(Collection<Resource> resources)
          deploy resources
 Resources getAllResources()
           
 boolean isConnectorRuntimeInitialized()
          Check whether connector-runtime is initialized.
 void postConstruct()
           
 void preDestroy()
          Do cleanup of system-resource-adapter, resources, pools
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceManager

public ResourceManager()
Method Detail

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.jvnet.hk2.component.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.jvnet.hk2.component.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 org.jvnet.hk2.config.UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
Notification that @Configured objects that were injected have changed

Specified by:
changed in interface org.jvnet.hk2.config.ConfigListener
Parameters:
events - list of changes

isConnectorRuntimeInitialized

public boolean isConnectorRuntimeInitialized()
Check whether connector-runtime is initialized.

Returns:
boolean representing connector-runtime initialization status.


Copyright © 2012 GlassFish Community. All Rights Reserved.