Class ResourceBase

java.lang.Object
org.apache.tomcat.util.descriptor.web.ResourceBase
All Implemented Interfaces:
Serializable, Injectable
Direct Known Subclasses:
ContextEjb, ContextEnvironment, ContextHandler, ContextLocalEjb, ContextResource, ContextResourceEnvRef, ContextResourceLink, ContextService, MessageDestination, MessageDestinationRef

public class ResourceBase extends Object implements Serializable, Injectable
Representation of a Context element.
See Also:
  • Constructor Details

    • ResourceBase

      public ResourceBase()
      Default constructor.
  • Method Details

    • getDescription

      public String getDescription()
      Return the description of this resource.
      Returns:
      The description of this resource
    • setDescription

      public void setDescription(String description)
      Set the description of this resource.
      Parameters:
      description - The description of this resource
    • getName

      public String getName()
      Description copied from interface: Injectable
      Returns the name of this injectable.
      Specified by:
      getName in interface Injectable
      Returns:
      the name
    • setName

      public void setName(String name)
      Set the name of this resource.
      Parameters:
      name - The name of this resource
    • getType

      public String getType()
      Return the name of the resource implementation class.
      Returns:
      The name of the resource implementation class
    • setType

      public void setType(String type)
      Set the name of the resource implementation class.
      Parameters:
      type - The name of the resource implementation class
    • getLookupName

      public String getLookupName()
      Return the JNDI lookup name for this resource.
      Returns:
      The JNDI lookup name
    • setLookupName

      public void setLookupName(String lookupName)
      Set the JNDI lookup name for this resource.
      Parameters:
      lookupName - The JNDI lookup name
    • getProperty

      public Object getProperty(String name)
      Returns the value of the specified property.
      Parameters:
      name - The property name
      Returns:
      the configured property value
    • setProperty

      public void setProperty(String name, Object value)
      Set a configured property.
      Parameters:
      name - The property name
      value - The property value
    • removeProperty

      public void removeProperty(String name)
      Remove a configured property.
      Parameters:
      name - The property name
    • listProperties

      public Iterator<String> listProperties()
      List properties.
      Returns:
      the property names iterator
    • addInjectionTarget

      public void addInjectionTarget(String injectionTargetName, String jndiName)
      Description copied from interface: Injectable
      Adds an injection target to this injectable.
      Specified by:
      addInjectionTarget in interface Injectable
      Parameters:
      injectionTargetName - the name of the injection target
      jndiName - the JNDI name for the injection
    • getInjectionTargets

      public List<InjectionTarget> getInjectionTargets()
      Description copied from interface: Injectable
      Returns the list of injection targets.
      Specified by:
      getInjectionTargets in interface Injectable
      Returns:
      the list of injection targets
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class 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