Class ContextResource

java.lang.Object
org.apache.tomcat.util.descriptor.web.ResourceBase
org.apache.tomcat.util.descriptor.web.ContextResource
All Implemented Interfaces:
Serializable, Injectable

public class ContextResource extends ResourceBase
Representation of a resource reference for a web application, as represented in a <resource-ref> element in the deployment descriptor.
See Also:
  • Constructor Details

    • ContextResource

      public ContextResource()
      Default constructor for ContextResource.
  • Method Details

    • getAuth

      public String getAuth()
      Returns the authorization requirement for this resource.
      Returns:
      the authorization type
    • setAuth

      public void setAuth(String auth)
      Sets the authorization requirement for this resource.
      Parameters:
      auth - the authorization type
    • getScope

      public String getScope()
      Returns the sharing scope of this resource factory.
      Returns:
      the sharing scope
    • setScope

      public void setScope(String scope)
      Sets the sharing scope of this resource factory.
      Parameters:
      scope - the sharing scope
    • getSingleton

      public boolean getSingleton()
      Returns whether this resource is a singleton.
      Returns:
      true if the resource is a singleton
    • setSingleton

      public void setSingleton(boolean singleton)
      Sets whether this resource is a singleton.
      Parameters:
      singleton - true if the resource is a singleton
    • getCloseMethod

      public String getCloseMethod()
      Returns the close method name.
      Returns:
      the close method name
    • setCloseMethod

      public void setCloseMethod(String closeMethod)
      Sets the close method name.
      Parameters:
      closeMethod - the close method name
    • getCloseMethodConfigured

      public boolean getCloseMethodConfigured()
      Returns whether the close method has been explicitly configured.
      Returns:
      true if the close method was configured
    • toString

      public String toString()
      Return a String representation of this object.
      Overrides:
      toString in class Object
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class ResourceBase