Package org.apache.xmlrpc.webserver
Class HttpServletRequestImpl
- java.lang.Object
-
- org.apache.xmlrpc.webserver.HttpServletRequestImpl
-
- All Implemented Interfaces:
javax.servlet.http.HttpServletRequest,javax.servlet.ServletRequest
public class HttpServletRequestImpl extends Object implements javax.servlet.http.HttpServletRequest
Stub implementation of aHttpServletRequestwith lots of unimplemented methods. I implemented only those, which are required for testing theXmlRpcServlet. Perhaps someone else is adding more at a later time?
-
-
Constructor Summary
Constructors Constructor Description HttpServletRequestImpl(Socket pSocket)Creates a new instance, which reads input from the given socket.
-
Method Summary
-
-
-
Constructor Detail
-
HttpServletRequestImpl
public HttpServletRequestImpl(Socket pSocket) throws IOException
Creates a new instance, which reads input from the given socket.- Parameters:
pSocket- The socket, to which the client is connected.- Throws:
IOException- Accessing the sockets input stream failed.
-
-
Method Detail
-
readHttpHeaders
public void readHttpHeaders() throws IOException, ServletWebServer.ExceptionRead the header lines, one by one. Note, that the size of the buffer is a limitation of the maximum header length!
-
readLine
protected String readLine(byte[] pBuffer) throws IOException
- Throws:
IOException
-
getAuthType
public String getAuthType()
- Specified by:
getAuthTypein interfacejavax.servlet.http.HttpServletRequest
-
getContextPath
public String getContextPath()
- Specified by:
getContextPathin interfacejavax.servlet.http.HttpServletRequest
-
getCookies
public javax.servlet.http.Cookie[] getCookies()
- Specified by:
getCookiesin interfacejavax.servlet.http.HttpServletRequest
-
getDateHeader
public long getDateHeader(String arg0)
- Specified by:
getDateHeaderin interfacejavax.servlet.http.HttpServletRequest
-
getHeader
public String getHeader(String pHeader)
- Specified by:
getHeaderin interfacejavax.servlet.http.HttpServletRequest
-
getHeaderNames
public Enumeration getHeaderNames()
- Specified by:
getHeaderNamesin interfacejavax.servlet.http.HttpServletRequest
-
getHeaders
public Enumeration getHeaders(String pHeader)
- Specified by:
getHeadersin interfacejavax.servlet.http.HttpServletRequest
-
getPart
public javax.servlet.http.Part getPart(String name)
- Specified by:
getPartin interfacejavax.servlet.http.HttpServletRequest
-
getParts
public Collection getParts()
- Specified by:
getPartsin interfacejavax.servlet.http.HttpServletRequest
-
authenticate
public boolean authenticate(javax.servlet.http.HttpServletResponse response)
- Specified by:
authenticatein interfacejavax.servlet.http.HttpServletRequest
-
getIntHeader
public int getIntHeader(String pHeader)
- Specified by:
getIntHeaderin interfacejavax.servlet.http.HttpServletRequest
-
getMethod
public String getMethod()
- Specified by:
getMethodin interfacejavax.servlet.http.HttpServletRequest
-
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfoin interfacejavax.servlet.http.HttpServletRequest
-
getPathTranslated
public String getPathTranslated()
- Specified by:
getPathTranslatedin interfacejavax.servlet.http.HttpServletRequest
-
getQueryString
public String getQueryString()
- Specified by:
getQueryStringin interfacejavax.servlet.http.HttpServletRequest
-
getRemoteUser
public String getRemoteUser()
- Specified by:
getRemoteUserin interfacejavax.servlet.http.HttpServletRequest
-
login
public void login(String username, String password)
- Specified by:
loginin interfacejavax.servlet.http.HttpServletRequest
-
logout
public void logout()
- Specified by:
logoutin interfacejavax.servlet.http.HttpServletRequest
-
getRequestURI
public String getRequestURI()
- Specified by:
getRequestURIin interfacejavax.servlet.http.HttpServletRequest
-
getRequestURL
public StringBuffer getRequestURL()
- Specified by:
getRequestURLin interfacejavax.servlet.http.HttpServletRequest
-
getAsyncContext
public javax.servlet.AsyncContext getAsyncContext()
- Specified by:
getAsyncContextin interfacejavax.servlet.ServletRequest
-
isAsyncSupported
public boolean isAsyncSupported()
- Specified by:
isAsyncSupportedin interfacejavax.servlet.ServletRequest
-
isAsyncStarted
public boolean isAsyncStarted()
- Specified by:
isAsyncStartedin interfacejavax.servlet.ServletRequest
-
getServletContext
public javax.servlet.ServletContext getServletContext()
- Specified by:
getServletContextin interfacejavax.servlet.ServletRequest
-
startAsync
public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp)- Specified by:
startAsyncin interfacejavax.servlet.ServletRequest
-
startAsync
public javax.servlet.AsyncContext startAsync()
- Specified by:
startAsyncin interfacejavax.servlet.ServletRequest
-
getDispatcherType
public javax.servlet.DispatcherType getDispatcherType()
- Specified by:
getDispatcherTypein interfacejavax.servlet.ServletRequest
-
getRequestedSessionId
public String getRequestedSessionId()
- Specified by:
getRequestedSessionIdin interfacejavax.servlet.http.HttpServletRequest
-
getServletPath
public String getServletPath()
- Specified by:
getServletPathin interfacejavax.servlet.http.HttpServletRequest
-
getSession
public javax.servlet.http.HttpSession getSession()
- Specified by:
getSessionin interfacejavax.servlet.http.HttpServletRequest
-
getSession
public javax.servlet.http.HttpSession getSession(boolean pCreate)
- Specified by:
getSessionin interfacejavax.servlet.http.HttpServletRequest
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipalin interfacejavax.servlet.http.HttpServletRequest
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
- Specified by:
isRequestedSessionIdFromCookiein interfacejavax.servlet.http.HttpServletRequest
-
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
- Specified by:
isRequestedSessionIdFromURLin interfacejavax.servlet.http.HttpServletRequest
-
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
- Specified by:
isRequestedSessionIdFromUrlin interfacejavax.servlet.http.HttpServletRequest
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
- Specified by:
isRequestedSessionIdValidin interfacejavax.servlet.http.HttpServletRequest
-
isUserInRole
public boolean isUserInRole(String pRole)
- Specified by:
isUserInRolein interfacejavax.servlet.http.HttpServletRequest
-
getAttribute
public Object getAttribute(String pKey)
- Specified by:
getAttributein interfacejavax.servlet.ServletRequest
-
getAttributeNames
public Enumeration getAttributeNames()
- Specified by:
getAttributeNamesin interfacejavax.servlet.ServletRequest
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncodingin interfacejavax.servlet.ServletRequest
-
setCharacterEncoding
public void setCharacterEncoding(String pEncoding)
- Specified by:
setCharacterEncodingin interfacejavax.servlet.ServletRequest
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin interfacejavax.servlet.ServletRequest
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfacejavax.servlet.ServletRequest
-
getInputStream
public javax.servlet.ServletInputStream getInputStream() throws IOException- Specified by:
getInputStreamin interfacejavax.servlet.ServletRequest- Throws:
IOException
-
getLocale
public Locale getLocale()
- Specified by:
getLocalein interfacejavax.servlet.ServletRequest
-
getLocales
public Enumeration getLocales()
- Specified by:
getLocalesin interfacejavax.servlet.ServletRequest
-
parseParameters
protected void parseParameters()
-
getParameter
public String getParameter(String pName)
- Specified by:
getParameterin interfacejavax.servlet.ServletRequest
-
getParameterMap
public Map getParameterMap()
- Specified by:
getParameterMapin interfacejavax.servlet.ServletRequest
-
getParameterNames
public Enumeration getParameterNames()
- Specified by:
getParameterNamesin interfacejavax.servlet.ServletRequest
-
getParameterValues
public String[] getParameterValues(String pName)
- Specified by:
getParameterValuesin interfacejavax.servlet.ServletRequest
-
getProtocol
public String getProtocol()
- Specified by:
getProtocolin interfacejavax.servlet.ServletRequest
-
getReader
public BufferedReader getReader() throws IOException
- Specified by:
getReaderin interfacejavax.servlet.ServletRequest- Throws:
IOException
-
getRealPath
public String getRealPath(String pPath)
- Specified by:
getRealPathin interfacejavax.servlet.ServletRequest
-
getLocalAddr
public String getLocalAddr()
- Specified by:
getLocalAddrin interfacejavax.servlet.ServletRequest
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfacejavax.servlet.ServletRequest
-
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPortin interfacejavax.servlet.ServletRequest
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddrin interfacejavax.servlet.ServletRequest
-
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHostin interfacejavax.servlet.ServletRequest
-
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePortin interfacejavax.servlet.ServletRequest
-
getRequestDispatcher
public javax.servlet.RequestDispatcher getRequestDispatcher(String pUri)
- Specified by:
getRequestDispatcherin interfacejavax.servlet.ServletRequest
-
getScheme
public String getScheme()
- Specified by:
getSchemein interfacejavax.servlet.ServletRequest
-
getServerName
public String getServerName()
- Specified by:
getServerNamein interfacejavax.servlet.ServletRequest
-
getServerPort
public int getServerPort()
- Specified by:
getServerPortin interfacejavax.servlet.ServletRequest
-
isSecure
public boolean isSecure()
- Specified by:
isSecurein interfacejavax.servlet.ServletRequest
-
removeAttribute
public void removeAttribute(String pKey)
- Specified by:
removeAttributein interfacejavax.servlet.ServletRequest
-
setAttribute
public void setAttribute(String pKey, Object pValue)
- Specified by:
setAttributein interfacejavax.servlet.ServletRequest
-
getHttpVersion
protected String getHttpVersion()
-
getContentLengthLong
public long getContentLengthLong()
- Specified by:
getContentLengthLongin interfacejavax.servlet.ServletRequest
-
changeSessionId
public String changeSessionId()
- Specified by:
changeSessionIdin interfacejavax.servlet.http.HttpServletRequest
-
upgrade
public javax.servlet.http.HttpUpgradeHandler upgrade(Class arg0)
- Specified by:
upgradein interfacejavax.servlet.http.HttpServletRequest
-
-