Package org.apache.shiro.web.servlet
Class ServletContextSupport
- java.lang.Object
-
- org.apache.shiro.web.servlet.ServletContextSupport
-
- Direct Known Subclasses:
AbstractFilter
public class ServletContextSupport extends Object
Base implementation for any components that need to access the web application'sServletContext
.- Since:
- 0.2
-
-
Constructor Summary
Constructors Constructor Description ServletContextSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
getContextAttribute(String key)
protected String
getContextInitParam(String paramName)
ServletContext
getServletContext()
protected void
removeContextAttribute(String key)
protected void
setContextAttribute(String key, Object value)
void
setServletContext(ServletContext servletContext)
String
toString()
It is highly recommended not to override this method directly, and instead override thetoStringBuilder()
method, a better-performing alternative.protected StringBuilder
toStringBuilder()
Same concept astoString()
, but returns aStringBuilder
instance instead.
-
-
-
Constructor Detail
-
ServletContextSupport
public ServletContextSupport()
-
-
Method Detail
-
getServletContext
public ServletContext getServletContext()
-
setServletContext
public void setServletContext(ServletContext servletContext)
-
getContextInitParam
protected String getContextInitParam(String paramName)
-
setContextAttribute
protected void setContextAttribute(String key, Object value)
-
getContextAttribute
protected Object getContextAttribute(String key)
-
removeContextAttribute
protected void removeContextAttribute(String key)
-
toString
public String toString()
It is highly recommended not to override this method directly, and instead override thetoStringBuilder()
method, a better-performing alternative.
-
toStringBuilder
protected StringBuilder toStringBuilder()
Same concept astoString()
, but returns aStringBuilder
instance instead.- Returns:
- a StringBuilder instance to use for appending String data that will eventually be returned from a
toString()
invocation.
-
-