Class ContextResource
- java.lang.Object
-
- org.apache.tomcat.util.descriptor.web.ResourceBase
-
- org.apache.tomcat.util.descriptor.web.ContextResource
-
- All Implemented Interfaces:
java.io.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()Default constructor for ContextResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetAuth()Returns the authorization requirement for this resource.java.lang.StringgetCloseMethod()Returns the close method name.booleangetCloseMethodConfigured()Returns whether the close method has been explicitly configured.java.lang.StringgetScope()Returns the sharing scope of this resource factory.booleangetSingleton()Returns whether this resource is a singleton.inthashCode()voidsetAuth(java.lang.String auth)Sets the authorization requirement for this resource.voidsetCloseMethod(java.lang.String closeMethod)Sets the close method name.voidsetScope(java.lang.String scope)Sets the sharing scope of this resource factory.voidsetSingleton(boolean singleton)Sets whether this resource is a singleton.java.lang.StringtoString()Return a String representation of this object.-
Methods inherited from class org.apache.tomcat.util.descriptor.web.ResourceBase
addInjectionTarget, getDescription, getInjectionTargets, getLookupName, getName, getNamingResources, getProperty, getType, listProperties, removeProperty, setDescription, setLookupName, setName, setNamingResources, setProperty, setType
-
-
-
-
Method Detail
-
getAuth
public java.lang.String getAuth()
Returns the authorization requirement for this resource.- Returns:
- the authorization type
-
setAuth
public void setAuth(java.lang.String auth)
Sets the authorization requirement for this resource.- Parameters:
auth- the authorization type
-
getScope
public java.lang.String getScope()
Returns the sharing scope of this resource factory.- Returns:
- the sharing scope
-
setScope
public void setScope(java.lang.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 java.lang.String getCloseMethod()
Returns the close method name.- Returns:
- the close method name
-
setCloseMethod
public void setCloseMethod(java.lang.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 java.lang.String toString()
Return a String representation of this object.- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classResourceBase
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classResourceBase
-
-