Class ContextResource
java.lang.Object
org.apache.tomcat.util.descriptor.web.ResourceBase
org.apache.tomcat.util.descriptor.web.ContextResource
- All Implemented Interfaces:
Serializable, Injectable
Representation of a resource reference for a web application, as represented in a
<resource-ref>
element in the deployment descriptor.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAuth()Returns the authorization requirement for this resource.Returns the close method name.booleanReturns whether the close method has been explicitly configured.getScope()Returns the sharing scope of this resource factory.booleanReturns whether this resource is a singleton.inthashCode()voidSets the authorization requirement for this resource.voidsetCloseMethod(String closeMethod) Sets the close method name.voidSets the sharing scope of this resource factory.voidsetSingleton(boolean singleton) Sets whether this resource is a singleton.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
-
Constructor Details
-
ContextResource
public ContextResource()Default constructor for ContextResource.
-
-
Method Details
-
getAuth
Returns the authorization requirement for this resource.- Returns:
- the authorization type
-
setAuth
Sets the authorization requirement for this resource.- Parameters:
auth- the authorization type
-
getScope
Returns the sharing scope of this resource factory.- Returns:
- the sharing scope
-
setScope
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
-
setCloseMethod
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
-
hashCode
public int hashCode()- Overrides:
hashCodein classResourceBase
-
equals
- Overrides:
equalsin classResourceBase
-