Class ResourceBase
- java.lang.Object
-
- org.apache.tomcat.util.descriptor.web.ResourceBase
-
- All Implemented Interfaces:
java.io.Serializable,Injectable
- Direct Known Subclasses:
ContextEjb,ContextEnvironment,ContextHandler,ContextLocalEjb,ContextResource,ContextResourceEnvRef,ContextResourceLink,ContextService,MessageDestination,MessageDestinationRef
public class ResourceBase extends java.lang.Object implements java.io.Serializable, Injectable
Representation of a Context element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResourceBase()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInjectionTarget(java.lang.String injectionTargetName, java.lang.String jndiName)Adds an injection target to this injectable.booleanequals(java.lang.Object obj)java.lang.StringgetDescription()Return the description of this resource.java.util.List<InjectionTarget>getInjectionTargets()Returns the list of injection targets.java.lang.StringgetLookupName()Return the JNDI lookup name for this resource.java.lang.StringgetName()Returns the name of this injectable.NamingResourcesgetNamingResources()Return the NamingResources with which this resource is associated.java.lang.ObjectgetProperty(java.lang.String name)Returns the value of the specified property.java.lang.StringgetType()Return the name of the resource implementation class.inthashCode()java.util.Iterator<java.lang.String>listProperties()List properties.voidremoveProperty(java.lang.String name)Remove a configured property.voidsetDescription(java.lang.String description)Set the description of this resource.voidsetLookupName(java.lang.String lookupName)Set the JNDI lookup name for this resource.voidsetName(java.lang.String name)Set the name of this resource.voidsetNamingResources(NamingResources resources)Set the NamingResources with which this resource is associated.voidsetProperty(java.lang.String name, java.lang.Object value)Set a configured property.voidsetType(java.lang.String type)Set the name of the resource implementation class.
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Return the description of this resource.- Returns:
- The description of this resource
-
setDescription
public void setDescription(java.lang.String description)
Set the description of this resource.- Parameters:
description- The description of this resource
-
getName
public java.lang.String getName()
Description copied from interface:InjectableReturns the name of this injectable.- Specified by:
getNamein interfaceInjectable- Returns:
- the name
-
setName
public void setName(java.lang.String name)
Set the name of this resource.- Parameters:
name- The name of this resource
-
getType
public java.lang.String getType()
Return the name of the resource implementation class.- Returns:
- The name of the resource implementation class
-
setType
public void setType(java.lang.String type)
Set the name of the resource implementation class.- Parameters:
type- The name of the resource implementation class
-
getLookupName
public java.lang.String getLookupName()
Return the JNDI lookup name for this resource.- Returns:
- The JNDI lookup name
-
setLookupName
public void setLookupName(java.lang.String lookupName)
Set the JNDI lookup name for this resource.- Parameters:
lookupName- The JNDI lookup name
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
Returns the value of the specified property.- Parameters:
name- The property name- Returns:
- the configured property value
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)Set a configured property.- Parameters:
name- The property namevalue- The property value
-
removeProperty
public void removeProperty(java.lang.String name)
Remove a configured property.- Parameters:
name- The property name
-
listProperties
public java.util.Iterator<java.lang.String> listProperties()
List properties.- Returns:
- the property names iterator
-
addInjectionTarget
public void addInjectionTarget(java.lang.String injectionTargetName, java.lang.String jndiName)Description copied from interface:InjectableAdds an injection target to this injectable.- Specified by:
addInjectionTargetin interfaceInjectable- Parameters:
injectionTargetName- the name of the injection targetjndiName- the JNDI name for the injection
-
getInjectionTargets
public java.util.List<InjectionTarget> getInjectionTargets()
Description copied from interface:InjectableReturns the list of injection targets.- Specified by:
getInjectionTargetsin interfaceInjectable- Returns:
- the list of injection targets
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getNamingResources
public NamingResources getNamingResources()
Return the NamingResources with which this resource is associated.- Returns:
- The NamingResources with which this resource is associated
-
setNamingResources
public void setNamingResources(NamingResources resources)
Set the NamingResources with which this resource is associated.- Parameters:
resources- The NamingResources with which this resource is associated
-
-