org.glassfish.javaee.services
Class ResourceProxy

java.lang.Object
  extended by org.glassfish.javaee.services.ResourceProxy
All Implemented Interfaces:
NamingObjectProxy, NamingObjectProxy.InitializationNamingObjectProxy

@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
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
ResourceProxy()
           
 
Method Summary
 Object create(Context ic)
           
protected  ResourceDeployer getResourceDeployer(Object resource)
          Given a resource instance, appropriate deployer will be provided
 void setResource(Resource resource)
          Set the resource config bean instance
 void setResourceInfo(ResourceInfo resourceInfo)
          Name by which the proxy (or the resource) will be bound in JNDI
protected  Object throwResourceNotFoundException(Exception e, ResourceInfo resourceInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceProxy

public ResourceProxy()
Method Detail

create

public Object create(Context ic)
              throws NamingException
Specified by:
create in interface NamingObjectProxy
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


Copyright © 2012 GlassFish Community. All Rights Reserved.