|
||||||||
| 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 |
| Constructor Detail |
public AbstractServletContextWrapper(ServletContext theOriginalContext)
| Method Detail |
public Object getAttribute(String theName)
getAttribute in interface ServletContextaround() in LogAspect.public Enumeration getAttributeNames()
getAttributeNames in interface ServletContextpublic ServletContext getContext(String theUripath)
getContext in interface ServletContextaround() in LogAspect.public String getInitParameter(String theName)
getInitParameter in interface ServletContextaround() in LogAspect.public Enumeration getInitParameterNames()
getInitParameterNames in interface ServletContextpublic Vector getLogs()
public int getMajorVersion()
getMajorVersion in interface ServletContextpublic String getMimeType(String theFilename)
getMimeType in interface ServletContextaround() in LogAspect.public int getMinorVersion()
getMinorVersion in interface ServletContextpublic RequestDispatcher getNamedDispatcher(String theName)
getNamedDispatcher in interface ServletContextaround() in LogAspect.public String getRealPath(String thePath)
getRealPath in interface ServletContextaround() in LogAspect.public RequestDispatcher getRequestDispatcher(String thePath)
getRequestDispatcher in interface ServletContextaround() in LogAspect.
public URL getResource(String thePath)
throws java.net.MalformedURLException
getResource in interface ServletContextaround() in LogAspect.public InputStream getResourceAsStream(String thePath)
getResourceAsStream in interface ServletContextaround() in LogAspect.public String getServerInfo()
getServerInfo in interface ServletContext
public Servlet getServlet(String theName)
throws javax.servlet.ServletException
getServlet in interface ServletContextaround() in LogAspect.public Enumeration getServletNames()
getServletNames in interface ServletContextpublic Enumeration getServlets()
getServlets in interface ServletContext
public void log(String theMessage,
Throwable theCause)
log in interface ServletContextaround() in LogAspect.public void log(String theMessage)
log in interface ServletContextaround() in LogAspect.
public void log(Exception theException,
String theMessage)
log in interface ServletContextaround() in LogAspect.public void removeAttribute(String theName)
removeAttribute in interface ServletContextaround() in LogAspect.
public void setAttribute(String theName,
Object theAttribute)
setAttribute in interface ServletContextaround() in LogAspect.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTRUCTOR | METHOD | DETAIL: FIELD | CONSTRUCTOR | METHOD | |||||||