public abstract class NameableFilter extends AbstractFilter implements Nameable
getName()
/setName(String)
methods. If no name is specified, the name of the filter will
default to the name given to it in web.xml
(the FilterConfig
's
filterName
).filterConfig
Constructor and Description |
---|
NameableFilter() |
Modifier and Type | Method and Description |
---|---|
protected String |
getName()
Returns the filter's name.
|
void |
setName(String name)
Sets the filter's name.
|
protected StringBuilder |
toStringBuilder()
Returns a StringBuilder instance with the
name , or if the name is null , just the
super.toStringBuilder() instance. |
destroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfig
getContextAttribute, getContextInitParam, getServletContext, removeContextAttribute, setContextAttribute, setServletContext, toString
public NameableFilter()
protected String getName()
setName(String)
method, this value defaults to the
filter name as specified by the servlet container at start-up:
this.name =getFilterConfig()
.getName()
;
null
if none availableGenericServlet.getServletName()
,
FilterConfig.getFilterName()
public void setName(String name)
this.name =getFilterConfig()
.getName()
;
protected StringBuilder toStringBuilder()
name
, or if the name is null
, just the
super.toStringBuilder()
instance.toStringBuilder
in class ServletContextSupport
toString()
invocation.Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.