org.apache.xmlrpc.webserver
Class HttpServletRequestImpl
java.lang.Object
org.apache.xmlrpc.webserver.HttpServletRequestImpl
public class HttpServletRequestImpl
- extends java.lang.Object
Stub implementation of a javax.servlet.http.HttpServletRequest
with lots of unimplemented methods. I implemented only those, which
are required for testing the XmlRpcServlet
.
Perhaps someone else is adding more at a later time?
Constructor Summary |
HttpServletRequestImpl(java.net.Socket pSocket)
Creates a new instance, which reads input from the given
socket. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpServletRequestImpl
public HttpServletRequestImpl(java.net.Socket pSocket)
throws java.io.IOException
- Creates a new instance, which reads input from the given
socket.
- Parameters:
pSocket
- The socket, to which the client is connected.
- Throws:
java.io.IOException
- Accessing the sockets input stream failed.
readHttpHeaders
public void readHttpHeaders()
throws java.io.IOException,
ServletWebServer.Exception
- Read the header lines, one by one. Note, that the size of
the buffer is a limitation of the maximum header length!
- Throws:
java.io.IOException
ServletWebServer.Exception
readLine
protected java.lang.String readLine(byte[] pBuffer)
throws java.io.IOException
- Throws:
java.io.IOException
addHeader
protected void addHeader(java.lang.String pHeader,
java.lang.String pValue)
getAuthType
public java.lang.String getAuthType()
getContextPath
public java.lang.String getContextPath()
getCookies
public Cookie[] getCookies()
getDateHeader
public long getDateHeader(java.lang.String arg0)
getHeader
public java.lang.String getHeader(java.lang.String pHeader)
getHeaderNames
public java.util.Enumeration getHeaderNames()
getHeaders
public java.util.Enumeration getHeaders(java.lang.String pHeader)
getIntHeader
public int getIntHeader(java.lang.String pHeader)
getMethod
public java.lang.String getMethod()
getPathInfo
public java.lang.String getPathInfo()
getPathTranslated
public java.lang.String getPathTranslated()
getQueryString
public java.lang.String getQueryString()
getRemoteUser
public java.lang.String getRemoteUser()
getRequestURI
public java.lang.String getRequestURI()
getRequestURL
public java.lang.StringBuffer getRequestURL()
getRequestedSessionId
public java.lang.String getRequestedSessionId()
getServletPath
public java.lang.String getServletPath()
getSession
public HttpSession getSession()
getSession
public HttpSession getSession(boolean pCreate)
getUserPrincipal
public java.security.Principal getUserPrincipal()
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
isUserInRole
public boolean isUserInRole(java.lang.String pRole)
getAttribute
public java.lang.Object getAttribute(java.lang.String pKey)
getAttributeNames
public java.util.Enumeration getAttributeNames()
getCharacterEncoding
public java.lang.String getCharacterEncoding()
setCharacterEncoding
public void setCharacterEncoding(java.lang.String pEncoding)
getContentLength
public int getContentLength()
getContentType
public java.lang.String getContentType()
getInputStream
public ServletInputStream getInputStream()
throws java.io.IOException
- Throws:
java.io.IOException
getLocale
public java.util.Locale getLocale()
getLocales
public java.util.Enumeration getLocales()
parseParameters
protected void parseParameters()
getParameter
public java.lang.String getParameter(java.lang.String pName)
getParameterMap
public java.util.Map getParameterMap()
getParameterNames
public java.util.Enumeration getParameterNames()
getParameterValues
public java.lang.String[] getParameterValues(java.lang.String pName)
getProtocol
public java.lang.String getProtocol()
getReader
public java.io.BufferedReader getReader()
throws java.io.IOException
- Throws:
java.io.IOException
getRealPath
public java.lang.String getRealPath(java.lang.String pPath)
getLocalAddr
public java.lang.String getLocalAddr()
getLocalName
public java.lang.String getLocalName()
getLocalPort
public int getLocalPort()
getRemoteAddr
public java.lang.String getRemoteAddr()
getRemoteHost
public java.lang.String getRemoteHost()
getRemotePort
public int getRemotePort()
getRequestDispatcher
public RequestDispatcher getRequestDispatcher(java.lang.String pUri)
getScheme
public java.lang.String getScheme()
getServerName
public java.lang.String getServerName()
getServerPort
public int getServerPort()
isSecure
public boolean isSecure()
removeAttribute
public void removeAttribute(java.lang.String pKey)
setAttribute
public void setAttribute(java.lang.String pKey,
java.lang.Object pValue)
getHttpVersion
protected java.lang.String getHttpVersion()
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.