站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.2.0 patch1 API 英文版文档

MockServletContext (JBoss Seam API Documentation) - JBoss Seam 1.2.0 patch1 API 英文版文档


org.jboss.seam.mock
Class MockServletContext

java.lang.Object
  extended by org.jboss.seam.mock.MockServletContext
All Implemented Interfaces:
javax.servlet.ServletContext

public class MockServletContext
extends Object
implements javax.servlet.ServletContext


Constructor Summary
MockServletContext()
           
 
Method Summary
 Object getAttribute(String att)
           
 Enumeration getAttributeNames()
           
 Map<String,Object> getAttributes()
           
 javax.servlet.ServletContext getContext(String name)
           
 String getContextPath()
           
 String getInitParameter(String param)
           
 Enumeration getInitParameterNames()
           
 Map<String,String> getInitParameters()
           
 int getMajorVersion()
           
 String getMimeType(String arg0)
           
 int getMinorVersion()
           
 javax.servlet.RequestDispatcher getNamedDispatcher(String name)
           
 String getRealPath(String relativePath)
           
 javax.servlet.RequestDispatcher getRequestDispatcher(String url)
           
 URL getResource(String name)
           
 InputStream getResourceAsStream(String name)
           
 Set getResourcePaths(String name)
           
 String getServerInfo()
           
 javax.servlet.Servlet getServlet(String name)
           
 String getServletContextName()
           
 Enumeration getServletNames()
           
 Enumeration getServlets()
           
 void log(Exception ex, String msg)
           
 void log(String msg)
           
 void log(String msg, Throwable ex)
           
 void removeAttribute(String att)
           
 void setAttribute(String att, Object val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServletContext

public MockServletContext()
Method Detail

getInitParameters

public Map<String,String> getInitParameters()

getAttributes

public Map<String,Object> getAttributes()

getContext

public javax.servlet.ServletContext getContext(String name)
Specified by:
getContext in interface javax.servlet.ServletContext

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface javax.servlet.ServletContext

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface javax.servlet.ServletContext

getMimeType

public String getMimeType(String arg0)
Specified by:
getMimeType in interface javax.servlet.ServletContext

getResourcePaths

public Set getResourcePaths(String name)
Specified by:
getResourcePaths in interface javax.servlet.ServletContext

getResource

public URL getResource(String name)
                throws MalformedURLException
Specified by:
getResource in interface javax.servlet.ServletContext
Throws:
MalformedURLException

getResourceAsStream

public InputStream getResourceAsStream(String name)
Specified by:
getResourceAsStream in interface javax.servlet.ServletContext

getRequestDispatcher

public javax.servlet.RequestDispatcher getRequestDispatcher(String url)
Specified by:
getRequestDispatcher in interface javax.servlet.ServletContext

getNamedDispatcher

public javax.servlet.RequestDispatcher getNamedDispatcher(String name)
Specified by:
getNamedDispatcher in interface javax.servlet.ServletContext

getServlet

public javax.servlet.Servlet getServlet(String name)
                                 throws javax.servlet.ServletException
Specified by:
getServlet in interface javax.servlet.ServletContext
Throws:
javax.servlet.ServletException

getServlets

public Enumeration getServlets()
Specified by:
getServlets in interface javax.servlet.ServletContext

getServletNames

public Enumeration getServletNames()
Specified by:
getServletNames in interface javax.servlet.ServletContext

log

public void log(String msg)
Specified by:
log in interface javax.servlet.ServletContext

log

public void log(Exception ex,
                String msg)
Specified by:
log in interface javax.servlet.ServletContext

log

public void log(String msg,
                Throwable ex)
Specified by:
log in interface javax.servlet.ServletContext

getRealPath

public String getRealPath(String relativePath)
Specified by:
getRealPath in interface javax.servlet.ServletContext

getServerInfo

public String getServerInfo()
Specified by:
getServerInfo in interface javax.servlet.ServletContext

getInitParameter

public String getInitParameter(String param)
Specified by:
getInitParameter in interface javax.servlet.ServletContext

getInitParameterNames

public Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface javax.servlet.ServletContext

getAttribute

public Object getAttribute(String att)
Specified by:
getAttribute in interface javax.servlet.ServletContext

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface javax.servlet.ServletContext

setAttribute

public void setAttribute(String att,
                         Object val)
Specified by:
setAttribute in interface javax.servlet.ServletContext

removeAttribute

public void removeAttribute(String att)
Specified by:
removeAttribute in interface javax.servlet.ServletContext

getServletContextName

public String getServletContextName()
Specified by:
getServletContextName in interface javax.servlet.ServletContext

getContextPath

public String getContextPath()