org.apache.openejb.jee
Class ResourceEnvRef

java.lang.Object
  extended by org.apache.openejb.jee.ResourceEnvRef
All Implemented Interfaces:
Injectable, JndiReference, Keyable<java.lang.String>

public class ResourceEnvRef
extends java.lang.Object
implements JndiReference

The resource-env-refType is used to define resource-env-type elements. It contains a declaration of a Deployment Component's reference to an administered object associated with a resource in the Deployment Component's environment. It consists of an optional description, the resource environment reference name, and an optional indication of the resource environment reference type expected by the Deployment Component code.

It also includes optional elements to define injection of the named resource into fields or JavaBeans properties.

The resource environment type must be supplied unless an injection target is specified, in which case the type of the target is used. If both are specified, the type must be assignment compatible with the type of the injection target.

Example:

jms/StockQueue javax.jms.Queue


Field Summary
protected  java.util.List<Text> description
           
protected  java.lang.String id
           
protected  java.util.List<InjectionTarget> injectionTarget
           
protected  java.lang.String mappedName
           
protected  java.lang.String resourceEnvRefName
           
protected  java.lang.String resourceEnvRefType
           
 
Constructor Summary
ResourceEnvRef()
           
ResourceEnvRef(java.lang.String resourceEnvRefName, java.lang.String resourceEnvRefType)
           
 
Method Summary
 java.util.List<Text> getDescription()
           
 java.lang.String getId()
           
 java.util.List<InjectionTarget> getInjectionTarget()
           
 java.lang.String getKey()
          Gets the immutable key for this object.
 java.lang.String getMappedName()
           
 java.lang.String getName()
           
 java.lang.String getResourceEnvRefName()
           
 java.lang.String getResourceEnvRefType()
           
 java.lang.String getType()
           
 void setId(java.lang.String value)
           
 void setMappedName(java.lang.String value)
           
 void setName(java.lang.String name)
           
 void setResourceEnvRefName(java.lang.String value)
           
 void setResourceEnvRefType(java.lang.String value)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

protected java.util.List<Text> description

resourceEnvRefName

protected java.lang.String resourceEnvRefName

resourceEnvRefType

protected java.lang.String resourceEnvRefType

mappedName

protected java.lang.String mappedName

injectionTarget

protected java.util.List<InjectionTarget> injectionTarget

id

protected java.lang.String id
Constructor Detail

ResourceEnvRef

public ResourceEnvRef()

ResourceEnvRef

public ResourceEnvRef(java.lang.String resourceEnvRefName,
                      java.lang.String resourceEnvRefType)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface JndiReference

getKey

public java.lang.String getKey()
Description copied from interface: Keyable
Gets the immutable key for this object.

Specified by:
getKey in interface Keyable<java.lang.String>
Returns:
gets the immutable key for this object

getType

public java.lang.String getType()
Specified by:
getType in interface JndiReference

setName

public void setName(java.lang.String name)
Specified by:
setName in interface JndiReference

setType

public void setType(java.lang.String type)
Specified by:
setType in interface JndiReference

getDescription

public java.util.List<Text> getDescription()

getResourceEnvRefName

public java.lang.String getResourceEnvRefName()

setResourceEnvRefName

public void setResourceEnvRefName(java.lang.String value)

getResourceEnvRefType

public java.lang.String getResourceEnvRefType()

setResourceEnvRefType

public void setResourceEnvRefType(java.lang.String value)

getMappedName

public java.lang.String getMappedName()
Specified by:
getMappedName in interface JndiReference

setMappedName

public void setMappedName(java.lang.String value)
Specified by:
setMappedName in interface JndiReference

getInjectionTarget

public java.util.List<InjectionTarget> getInjectionTarget()
Specified by:
getInjectionTarget in interface Injectable

getId

public java.lang.String getId()

setId

public void setId(java.lang.String value)


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.