com.caucho.config.types
Class ResourceRef

java.lang.Object
  extended by com.caucho.config.program.ConfigProgram
      extended by com.caucho.config.types.ResourceGroupConfig
          extended by com.caucho.config.types.ResourceRef
All Implemented Interfaces:
Validator, ObjectProxy, java.lang.Comparable<ConfigProgram>
Direct Known Subclasses:
ResourceEnvRef

public class ResourceRef
extends ResourceGroupConfig
implements Validator, ObjectProxy

Configuration for the init-param pattern.


Constructor Summary
ResourceRef()
           
 
Method Summary
 void deploy()
           
 ConfigException error(java.lang.String msg)
           
 ConfigProgram getInit()
          Gets the init program;
 InjectionTarget getInjectionTarget()
          Gets the injection-target
 java.lang.String getResRefName()
          Gets the name
 java.lang.Class<?> getResType()
          Gets the type;
 java.lang.Object getValue()
           
 void init()
          Initialize the resource.
 void setClassName(java.lang.Class<?> type)
          Sets the type
 void setConfigLocation(java.lang.String filename, int line)
          Sets the configuration location.
 void setDescription(java.lang.String description)
          Sets the description.
 void setId(java.lang.String id)
          Sets the id
 void setInit(ConfigProgram init)
          Sets the init program
 void setInitParam(InitParam initParam)
          Sets an init-parameter
 void setInjectionTarget(InjectionTarget injectionTarget)
          Sets the injection-target
 void setResAuth(java.lang.String auth)
          Sets the auth
 void setResRefName(java.lang.String name)
          Sets the name
 void setResSharingScope(java.lang.String share)
          Sets the sharing scope
 void setResType(java.lang.Class<?> type)
          Sets the type
 java.lang.String toString()
           
 void validate()
          Validates the resource-ref, i.e.
 
Methods inherited from class com.caucho.config.types.ResourceGroupConfig
addInjectionTarget, createObject, getJndiClassLoader, getLookupName, getProgram, getProgram, inferTypeFromInjection, inject, isProgram, setDefaultInjectionClass, setJndiClassLoader, setLookupName, setProgram
 
Methods inherited from class com.caucho.config.program.ConfigProgram
addProgram, bind, compareTo, configure, configure, configure, create, create, create, getDeclaringClass, getName, getPriority, getQName, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.naming.ObjectProxy
createObject
 

Constructor Detail

ResourceRef

public ResourceRef()
Method Detail

setId

public void setId(java.lang.String id)
Sets the id

Overrides:
setId in class ResourceGroupConfig

setConfigLocation

public void setConfigLocation(java.lang.String filename,
                              int line)
Sets the configuration location.

Overrides:
setConfigLocation in class ResourceGroupConfig

setDescription

public void setDescription(java.lang.String description)
Sets the description.

Overrides:
setDescription in class ResourceGroupConfig

setInjectionTarget

public void setInjectionTarget(InjectionTarget injectionTarget)
Sets the injection-target


setResRefName

public void setResRefName(java.lang.String name)
Sets the name


getResRefName

public java.lang.String getResRefName()
Gets the name


setResType

public void setResType(java.lang.Class<?> type)
Sets the type


setResAuth

public void setResAuth(java.lang.String auth)
Sets the auth


setResSharingScope

public void setResSharingScope(java.lang.String share)
Sets the sharing scope


setClassName

public void setClassName(java.lang.Class<?> type)
Sets the type


getInjectionTarget

public InjectionTarget getInjectionTarget()
Gets the injection-target


getResType

public java.lang.Class<?> getResType()
Gets the type;


setInit

public void setInit(ConfigProgram init)
Sets the init program


getInit

public ConfigProgram getInit()
Gets the init program;


setInitParam

public void setInitParam(InitParam initParam)
Sets an init-parameter


init

@PostConstruct
public void init()
          throws java.lang.Exception
Initialize the resource.

Overrides:
init in class ResourceGroupConfig
Throws:
java.lang.Exception

deploy

public void deploy()
Overrides:
deploy in class ResourceGroupConfig

getValue

public java.lang.Object getValue()
Overrides:
getValue in class ResourceGroupConfig

validate

public void validate()
              throws ConfigException
Validates the resource-ref, i.e. checking that it exists in JNDI.

Specified by:
validate in interface Validator
Throws:
ConfigException

error

public ConfigException error(java.lang.String msg)
Overrides:
error in class ResourceGroupConfig

toString

public java.lang.String toString()
Overrides:
toString in class ResourceGroupConfig