Package org.apache.catalina.deploy
Class FilterDef
- java.lang.Object
-
- org.apache.catalina.deploy.FilterDef
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FilterDefDecorator
public class FilterDef extends Object implements Serializable
Representation of a filter definition for a web application, as represented in a<filter>
element in the deployment descriptor.- Version:
- $Revision: 1.3.6.1 $ $Date: 2008/04/17 18:37:10 $
- Author:
- Craig R. McClanahan
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FilterDef()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInitParameter(String name, String value)
Adds the initialization parameter with the given name and value on this filter.String
getDescription()
String
getDisplayName()
jakarta.servlet.Filter
getFilter()
Class<? extends jakarta.servlet.Filter>
getFilterClass()
String
getFilterClassName()
String
getFilterName()
String
getInitParameter(String name)
Enumeration<String>
getInitParameterNames()
Map<String,String>
getInitParameters()
String
getLargeIcon()
String
getSmallIcon()
boolean
isAsyncSupported()
Checks if this filter has been annotated or flagged in the deployment descriptor as being able to support asynchronous operations.void
removeInitParameter(String name)
Removes the initialization parameter with the given name.void
setDescription(String description)
void
setDisplayName(String displayName)
void
setFilter(jakarta.servlet.Filter filter)
void
setFilterClass(Class<? extends jakarta.servlet.Filter> filterClass)
void
setFilterClassName(String filterClassName)
void
setFilterName(String filterName)
boolean
setInitParameter(String name, String value, boolean override)
Sets the init parameter with the given name and value on this filter.Set<String>
setInitParameters(Map<String,String> initParameters)
Sets the initialization parameters contained in the given map on this filter.void
setIsAsyncSupported(boolean isAsyncSupported)
Configures this filter as either supporting or not supporting asynchronous operations.void
setLargeIcon(String largeIcon)
void
setSmallIcon(String smallIcon)
String
toString()
Render a String representation of this object.
-
-
-
Method Detail
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getDisplayName
public String getDisplayName()
-
setDisplayName
public void setDisplayName(String displayName)
-
getFilterClassName
public String getFilterClassName()
-
setFilterClassName
public void setFilterClassName(String filterClassName)
-
getFilterClass
public Class<? extends jakarta.servlet.Filter> getFilterClass()
-
setFilterClass
public void setFilterClass(Class<? extends jakarta.servlet.Filter> filterClass)
-
getFilter
public jakarta.servlet.Filter getFilter()
-
setFilter
public void setFilter(jakarta.servlet.Filter filter)
-
getFilterName
public String getFilterName()
-
setFilterName
public void setFilterName(String filterName)
-
getLargeIcon
public String getLargeIcon()
-
setLargeIcon
public void setLargeIcon(String largeIcon)
-
getSmallIcon
public String getSmallIcon()
-
setSmallIcon
public void setSmallIcon(String smallIcon)
-
setIsAsyncSupported
public void setIsAsyncSupported(boolean isAsyncSupported)
Configures this filter as either supporting or not supporting asynchronous operations.- Parameters:
isAsyncSupported
- true if this filter supports asynchronous operations, false otherwise
-
isAsyncSupported
public boolean isAsyncSupported()
Checks if this filter has been annotated or flagged in the deployment descriptor as being able to support asynchronous operations.- Returns:
- true if this filter supports async operations, and false otherwise
-
addInitParameter
public void addInitParameter(String name, String value)
Adds the initialization parameter with the given name and value on this filter.If an init param with the given name already exists, its value will be overridden.
- Parameters:
name
- the init parameter namevalue
- the init parameter value
-
setInitParameter
public boolean setInitParameter(String name, String value, boolean override)
Sets the init parameter with the given name and value on this filter.- Parameters:
name
- the init parameter namevalue
- the init parameter valueoverride
- true if the given init param is supposed to override an existing init param with the same name, and false otherwise- Returns:
- true if the init parameter with the given name and value was set, false otherwise
-
setInitParameters
public Set<String> setInitParameters(Map<String,String> initParameters)
Sets the initialization parameters contained in the given map on this filter.- Parameters:
initParameters
- the map with the init params to set- Returns:
- the (possibly empty) Set of initialization parameter names that are in conflict
-
getInitParameterNames
public Enumeration<String> getInitParameterNames()
-
removeInitParameter
public void removeInitParameter(String name)
Removes the initialization parameter with the given name.- Parameters:
name
- the name of the initialization parameter to be removed
-
-