com.caucho.config.types
Class ResourceRef

java.lang.Object
  extended by com.caucho.config.types.ResourceRef
All Implemented Interfaces:
Validator

public class ResourceRef
extends java.lang.Object
implements Validator

Configuration for the init-param pattern.


Constructor Summary
ResourceRef()
           
 
Method Summary
 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;
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceRef

public ResourceRef()
Method Detail

setId

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


setConfigLocation

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


setDescription

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


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

public void init()
          throws java.lang.Throwable
Initialize the resource.

Throws:
java.lang.Throwable

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)

toString

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