public class DummyRequest extends Object implements javax.servlet.http.HttpServletRequest
Modifier and Type | Field and Description |
---|---|
protected String |
contextPath |
protected String |
decodedURI |
protected javax.servlet.FilterChain |
filterChain |
protected String |
pathInfo |
protected String |
queryString |
protected String |
servletPath |
protected Wrapper |
wrapper |
Constructor and Description |
---|
DummyRequest() |
DummyRequest(String contextPath,
String decodedURI,
String queryString) |
protected String contextPath
protected String decodedURI
protected String queryString
protected String pathInfo
protected String servletPath
protected Wrapper wrapper
protected javax.servlet.FilterChain filterChain
public String getContextPath()
getContextPath
in interface javax.servlet.http.HttpServletRequest
public MessageBytes getContextPathMB()
public javax.servlet.ServletRequest getRequest()
public String getDecodedRequestURI()
public MessageBytes getDecodedRequestURIMB()
public javax.servlet.FilterChain getFilterChain()
public void setFilterChain(javax.servlet.FilterChain filterChain)
public String getQueryString()
getQueryString
in interface javax.servlet.http.HttpServletRequest
public void setQueryString(String query)
public String getPathInfo()
getPathInfo
in interface javax.servlet.http.HttpServletRequest
public void setPathInfo(String path)
public MessageBytes getPathInfoMB()
public MessageBytes getRequestPathMB()
public String getServletPath()
getServletPath
in interface javax.servlet.http.HttpServletRequest
public void setServletPath(String path)
public MessageBytes getServletPathMB()
public Wrapper getWrapper()
public void setWrapper(Wrapper wrapper)
public String getAuthorization()
public void setAuthorization(String authorization)
public Connector getConnector()
public void setConnector(Connector connector)
public Context getContext()
public void setContext(Context context)
public Host getHost()
public void setHost(Host host)
public String getInfo()
public Response getResponse()
public void setResponse(Response response)
public Socket getSocket()
public void setSocket(Socket socket)
public InputStream getStream()
public void setStream(InputStream input)
public void addLocale(Locale locale)
public javax.servlet.ServletInputStream createInputStream() throws IOException
IOException
public void finishRequest() throws IOException
IOException
public Iterator getNoteNames()
public void removeNote(String name)
public void setContentType(String type)
public void setProtocol(String protocol)
public void setRemoteAddr(String remoteAddr)
public void setRemoteHost(String remoteHost)
public void setScheme(String scheme)
public void setServerName(String name)
public void setServerPort(int port)
public Object getAttribute(String name)
getAttribute
in interface javax.servlet.ServletRequest
public Enumeration getAttributeNames()
getAttributeNames
in interface javax.servlet.ServletRequest
public String getCharacterEncoding()
getCharacterEncoding
in interface javax.servlet.ServletRequest
public int getContentLength()
getContentLength
in interface javax.servlet.ServletRequest
public void setContentLength(int length)
public String getContentType()
getContentType
in interface javax.servlet.ServletRequest
public javax.servlet.ServletInputStream getInputStream() throws IOException
getInputStream
in interface javax.servlet.ServletRequest
IOException
public Locale getLocale()
getLocale
in interface javax.servlet.ServletRequest
public Enumeration getLocales()
getLocales
in interface javax.servlet.ServletRequest
public String getProtocol()
getProtocol
in interface javax.servlet.ServletRequest
public BufferedReader getReader() throws IOException
getReader
in interface javax.servlet.ServletRequest
IOException
public String getRealPath(String path)
getRealPath
in interface javax.servlet.ServletRequest
public String getRemoteAddr()
getRemoteAddr
in interface javax.servlet.ServletRequest
public String getRemoteHost()
getRemoteHost
in interface javax.servlet.ServletRequest
public String getScheme()
getScheme
in interface javax.servlet.ServletRequest
public String getServerName()
getServerName
in interface javax.servlet.ServletRequest
public int getServerPort()
getServerPort
in interface javax.servlet.ServletRequest
public boolean isSecure()
isSecure
in interface javax.servlet.ServletRequest
public void removeAttribute(String name)
removeAttribute
in interface javax.servlet.ServletRequest
public void setAttribute(String name, Object value)
setAttribute
in interface javax.servlet.ServletRequest
public void setCharacterEncoding(String enc) throws UnsupportedEncodingException
setCharacterEncoding
in interface javax.servlet.ServletRequest
UnsupportedEncodingException
public void addCookie(javax.servlet.http.Cookie cookie)
public void clearCookies()
public void clearHeaders()
public void clearLocales()
public void clearParameters()
public void recycle()
public void setAuthType(String authType)
public void setContextPath(String path)
public void setMethod(String method)
public void setRequestedSessionCookie(boolean flag)
public void setRequestedSessionId(String id)
public void setRequestedSessionURL(boolean flag)
public void setRequestURI(String uri)
public void setSecure(boolean secure)
public void setUserPrincipal(Principal principal)
public String getParameter(String name)
getParameter
in interface javax.servlet.ServletRequest
public Map getParameterMap()
getParameterMap
in interface javax.servlet.ServletRequest
public Enumeration getParameterNames()
getParameterNames
in interface javax.servlet.ServletRequest
public String[] getParameterValues(String name)
getParameterValues
in interface javax.servlet.ServletRequest
public javax.servlet.RequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher
in interface javax.servlet.ServletRequest
public String getAuthType()
getAuthType
in interface javax.servlet.http.HttpServletRequest
public javax.servlet.http.Cookie[] getCookies()
getCookies
in interface javax.servlet.http.HttpServletRequest
public long getDateHeader(String name)
getDateHeader
in interface javax.servlet.http.HttpServletRequest
public String getHeader(String name)
getHeader
in interface javax.servlet.http.HttpServletRequest
public Enumeration getHeaders(String name)
getHeaders
in interface javax.servlet.http.HttpServletRequest
public Enumeration getHeaderNames()
getHeaderNames
in interface javax.servlet.http.HttpServletRequest
public int getIntHeader(String name)
getIntHeader
in interface javax.servlet.http.HttpServletRequest
public String getMethod()
getMethod
in interface javax.servlet.http.HttpServletRequest
public String getPathTranslated()
getPathTranslated
in interface javax.servlet.http.HttpServletRequest
public String getRemoteUser()
getRemoteUser
in interface javax.servlet.http.HttpServletRequest
public String getRequestedSessionId()
getRequestedSessionId
in interface javax.servlet.http.HttpServletRequest
public String getRequestURI()
getRequestURI
in interface javax.servlet.http.HttpServletRequest
public void setDecodedRequestURI(String uri)
public StringBuffer getRequestURL()
getRequestURL
in interface javax.servlet.http.HttpServletRequest
public javax.servlet.http.HttpSession getSession()
getSession
in interface javax.servlet.http.HttpServletRequest
public javax.servlet.http.HttpSession getSession(boolean create)
getSession
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid
in interface javax.servlet.http.HttpServletRequest
public boolean isUserInRole(String role)
isUserInRole
in interface javax.servlet.http.HttpServletRequest
public Principal getUserPrincipal()
getUserPrincipal
in interface javax.servlet.http.HttpServletRequest
public String getLocalAddr()
getLocalAddr
in interface javax.servlet.ServletRequest
public String getLocalName()
getLocalName
in interface javax.servlet.ServletRequest
public int getLocalPort()
getLocalPort
in interface javax.servlet.ServletRequest
public int getRemotePort()
getRemotePort
in interface javax.servlet.ServletRequest
public void addAsyncListener(javax.servlet.AsyncListener listener, javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse)
public void addAsyncListener(javax.servlet.AsyncListener listener)
public javax.servlet.AsyncContext getAsyncContext()
getAsyncContext
in interface javax.servlet.ServletRequest
public javax.servlet.ServletContext getServletContext()
getServletContext
in interface javax.servlet.ServletRequest
public boolean isAsyncStarted()
isAsyncStarted
in interface javax.servlet.ServletRequest
public boolean isAsyncSupported()
isAsyncSupported
in interface javax.servlet.ServletRequest
public void setAsyncTimeout(long timeout)
public javax.servlet.AsyncContext startAsync() throws IllegalStateException
startAsync
in interface javax.servlet.ServletRequest
IllegalStateException
public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws IllegalStateException
startAsync
in interface javax.servlet.ServletRequest
IllegalStateException
public javax.servlet.DispatcherType getDispatcherType()
getDispatcherType
in interface javax.servlet.ServletRequest
public javax.servlet.ServletResponse getServletResponse()
public boolean authenticate(javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
authenticate
in interface javax.servlet.http.HttpServletRequest
IOException
javax.servlet.ServletException
public void login(String username, String password) throws javax.servlet.ServletException
login
in interface javax.servlet.http.HttpServletRequest
javax.servlet.ServletException
public void logout() throws javax.servlet.ServletException
logout
in interface javax.servlet.http.HttpServletRequest
javax.servlet.ServletException
public long getAsyncTimeout()
public javax.servlet.http.Part getPart(String name) throws IllegalArgumentException
getPart
in interface javax.servlet.http.HttpServletRequest
IllegalArgumentException
public Collection<javax.servlet.http.Part> getParts()
getParts
in interface javax.servlet.http.HttpServletRequest
public long getContentLengthLong()
getContentLengthLong
in interface javax.servlet.ServletRequest
public String changeSessionId()
changeSessionId
in interface javax.servlet.http.HttpServletRequest
public <T extends javax.servlet.http.HttpUpgradeHandler> T upgrade(Class<T> upgradeHandler) throws IOException
upgrade
in interface javax.servlet.http.HttpServletRequest
IOException
Copyright © 2017 JBoss by Red Hat. All rights reserved.