|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | POINTCUT | FIELD | CONSTRUCTOR | METHOD | DETAIL: FIELD | POINTCUT | CONSTRUCTOR | METHOD |
java.lang.Object | +--org.apache.cactus.server.AbstractServletContextWrapper
Abstract wrapper around ServletContext
. This class provides
a common implementation of the wrapper for the different servlet API. In
addition to implementing the ServletContext
interface it
provides additional features helpful for writing unit tests. More
specifically the getRequestDispatcher()
method is overrided
to return an request dispatcher wrapper. In addition logs generated by
calls to the log()
methods can be retrieved and asserted by
calling the getLogs()
method.
Constructor Summary | |
AbstractServletContextWrapper(ServletContext theOriginalContext)
|
Method Summary | |
Object |
getAttribute(String theName)
Affected by: LogAspect |
Enumeration |
getAttributeNames()
|
ServletContext |
getContext(String theUripath)
Affected by: LogAspect |
String |
getInitParameter(String theName)
Affected by: LogAspect |
Enumeration |
getInitParameterNames()
|
Vector |
getLogs()
|
int |
getMajorVersion()
|
String |
getMimeType(String theFilename)
Affected by: LogAspect |
int |
getMinorVersion()
|
RequestDispatcher |
getNamedDispatcher(String theName)
Affected by: LogAspect |
String |
getRealPath(String thePath)
Affected by: LogAspect |
RequestDispatcher |
getRequestDispatcher(String thePath)
Affected by: LogAspect |
URL |
getResource(String thePath)
Affected by: LogAspect |
InputStream |
getResourceAsStream(String thePath)
Affected by: LogAspect |
String |
getServerInfo()
|
Servlet |
getServlet(String theName)
Affected by: LogAspect |
Enumeration |
getServletNames()
|
Enumeration |
getServlets()
|
void |
log(String theMessage,
Throwable theCause)
Affected by: LogAspect |
void |
log(String theMessage)
Affected by: LogAspect |
void |
log(Exception theException,
String theMessage)
Affected by: LogAspect |
void |
removeAttribute(String theName)
Affected by: LogAspect |
void |
setAttribute(String theName,
Object theAttribute)
Affected by: LogAspect |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.ServletContext |
getResourcePaths, getServletContextName |
Constructor Detail |
public AbstractServletContextWrapper(ServletContext theOriginalContext)
Method Detail |
public Object getAttribute(String theName)
getAttribute
in interface ServletContext
around() in LogAspect
.public Enumeration getAttributeNames()
getAttributeNames
in interface ServletContext
public ServletContext getContext(String theUripath)
getContext
in interface ServletContext
around() in LogAspect
.public String getInitParameter(String theName)
getInitParameter
in interface ServletContext
around() in LogAspect
.public Enumeration getInitParameterNames()
getInitParameterNames
in interface ServletContext
public Vector getLogs()
public int getMajorVersion()
getMajorVersion
in interface ServletContext
public String getMimeType(String theFilename)
getMimeType
in interface ServletContext
around() in LogAspect
.public int getMinorVersion()
getMinorVersion
in interface ServletContext
public RequestDispatcher getNamedDispatcher(String theName)
getNamedDispatcher
in interface ServletContext
around() in LogAspect
.public String getRealPath(String thePath)
getRealPath
in interface ServletContext
around() in LogAspect
.public RequestDispatcher getRequestDispatcher(String thePath)
getRequestDispatcher
in interface ServletContext
around() in LogAspect
.public URL getResource(String thePath) throws java.net.MalformedURLException
getResource
in interface ServletContext
around() in LogAspect
.public InputStream getResourceAsStream(String thePath)
getResourceAsStream
in interface ServletContext
around() in LogAspect
.public String getServerInfo()
getServerInfo
in interface ServletContext
public Servlet getServlet(String theName) throws javax.servlet.ServletException
getServlet
in interface ServletContext
around() in LogAspect
.public Enumeration getServletNames()
getServletNames
in interface ServletContext
public Enumeration getServlets()
getServlets
in interface ServletContext
public void log(String theMessage, Throwable theCause)
log
in interface ServletContext
around() in LogAspect
.public void log(String theMessage)
log
in interface ServletContext
around() in LogAspect
.public void log(Exception theException, String theMessage)
log
in interface ServletContext
around() in LogAspect
.public void removeAttribute(String theName)
removeAttribute
in interface ServletContext
around() in LogAspect
.public void setAttribute(String theName, Object theAttribute)
setAttribute
in interface ServletContext
around() in LogAspect
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTRUCTOR | METHOD | DETAIL: FIELD | CONSTRUCTOR | METHOD |