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

# Class ContextResourceLink

java.lang.Object
org.apache.tomcat.util.descriptor.web.ResourceBase
org.apache.tomcat.util.descriptor.web.ContextResourceLink

All Implemented Interfaces:
  `Serializable, Injectable`

public class ContextResourceLink extends ResourceBase
Representation of a resource link for a web application, as represented in a `<ResourceLink>` element in the server configuration file.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContextResourceLink()`
  Default constructor for ContextResourceLink.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `getFactory()`
  Returns the factory to be used for creating the object.
  `String`
  `getGlobal()`
  Returns the global name of this resource.
  `int`
  `hashCode()`
  `void`
  `setFactory(String factory)`
  Sets the factory to be used for creating the object.
  `void`
  `setGlobal(String global)`
  Sets the global name of this resource.
  `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

  - ### ContextResourceLink

    public ContextResourceLink()
    Default constructor for ContextResourceLink.

- ## Method Details

  - ### getGlobal

    public String getGlobal()
    Returns the global name of this resource.
    Returns:
      the global resource name

  - ### setGlobal

    public void setGlobal(String global)
    Sets the global name of this resource.
    Parameters:
      `global` - the global resource name

  - ### getFactory

    public String getFactory()
    Returns the factory to be used for creating the object.
    Returns:
      the factory class name

  - ### setFactory

    public void setFactory(String factory)
    Sets the factory to be used for creating the object.
    Parameters:
      `factory` - the factory class name

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