ContextResource (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.tomcat.util.descriptor.web, class: ContextResource

# 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:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContextResource()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `getAuth()`
  `String`
  `getCloseMethod()`
  `boolean`
  `getCloseMethodConfigured()`
  `String`
  `getScope()`
  `boolean`
  `getSingleton()`
  `int`
  `hashCode()`
  `void`
  `setAuth(String auth)`
  `void`
  `setCloseMethod(String closeMethod)`
  `void`
  `setScope(String scope)`
  `void`
  `setSingleton(boolean singleton)`
  `String`
  `toString()`
  Return a String representation of this object.

  ### Methods inherited from class ResourceBase

  `addInjectionTarget, getDescription, getInjectionTargets, getLookupName, getName, getNamingResources, getProperty, getType, listProperties, removeProperty, setDescription, setLookupName, setName, setNamingResources, setProperty, setType`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ContextResource

    public ContextResource()

- ## Method Details

  - ### getAuth

    public String getAuth()

  - ### setAuth

    public void setAuth(String auth)

  - ### getScope

    public String getScope()

  - ### setScope

    public void setScope(String scope)

  - ### getSingleton

    public boolean getSingleton()

  - ### setSingleton

    public void setSingleton(boolean singleton)

  - ### getCloseMethod

    public String getCloseMethod()

  - ### setCloseMethod

    public void setCloseMethod(String closeMethod)

  - ### getCloseMethodConfigured

    public boolean getCloseMethodConfigured()

  - ### 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`