Class ResourceProxy
- java.lang.Object
-
- org.glassfish.resourcebase.resources.api.ResourceProxy
-
- All Implemented Interfaces:
NamingObjectProxy,NamingObjectProxy.InitializationNamingObjectProxy
@Service @PerLookup public class ResourceProxy extends Object implements NamingObjectProxy.InitializationNamingObjectProxy
Represents the proxy object for a resource. Proxy will be bound in jndi during startup and the actual resource will be deployed during first lookup- Author:
- Jagadish Ramu
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.naming.NamingObjectProxy
NamingObjectProxy.InitializationNamingObjectProxy
-
-
Constructor Summary
Constructors Constructor Description ResourceProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectcreate(Context ic)Create and return an object.protected ResourceDeployergetResourceDeployer(Object resource)Given a resource instance, appropriate deployer will be providedvoidsetResource(Resource resource)Set the resource config bean instancevoidsetResourceInfo(ResourceInfo resourceInfo)Name by which the proxy (or the resource) will be bound in JNDIprotected ObjectthrowResourceNotFoundException(Exception e, ResourceInfo resourceInfo)
-
-
-
Method Detail
-
create
public Object create(Context ic) throws NamingException
Description copied from interface:NamingObjectProxyCreate and return an object.- Specified by:
createin interfaceNamingObjectProxy- Returns:
- an object
- Throws:
NamingException
-
setResource
public void setResource(Resource resource)
Set the resource config bean instance- Parameters:
resource- config bean
-
setResourceInfo
public void setResourceInfo(ResourceInfo resourceInfo)
Name by which the proxy (or the resource) will be bound in JNDI- Parameters:
resourceInfo- resource-info
-
throwResourceNotFoundException
protected Object throwResourceNotFoundException(Exception e, ResourceInfo resourceInfo) throws NamingException
- Throws:
NamingException
-
getResourceDeployer
protected ResourceDeployer getResourceDeployer(Object resource)
Given a resource instance, appropriate deployer will be provided- Parameters:
resource- resource instance- Returns:
- ResourceDeployer
-
-