org.apache.xmlrpc.webserver
Class HttpServletRequestImpl

java.lang.Object
  extended by org.apache.xmlrpc.webserver.HttpServletRequestImpl

public class HttpServletRequestImpl
extends 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(Socket pSocket)
          Creates a new instance, which reads input from the given socket.
 
Method Summary
protected  void addHeader(String pHeader, String pValue)
           
 Object getAttribute(String pKey)
           
 Enumeration getAttributeNames()
           
 String getAuthType()
           
 String getCharacterEncoding()
           
 int getContentLength()
           
 String getContentType()
           
 String getContextPath()
           
 Cookie[] getCookies()
           
 long getDateHeader(String arg0)
           
 String getHeader(String pHeader)
           
 Enumeration getHeaderNames()
           
 Enumeration getHeaders(String pHeader)
           
protected  String getHttpVersion()
           
 ServletInputStream getInputStream()
           
 int getIntHeader(String pHeader)
           
 String getLocalAddr()
           
 Locale getLocale()
           
 Enumeration getLocales()
           
 String getLocalName()
           
 int getLocalPort()
           
 String getMethod()
           
 String getParameter(String pName)
           
 Map getParameterMap()
           
 Enumeration getParameterNames()
           
 String[] getParameterValues(String pName)
           
 String getPathInfo()
           
 String getPathTranslated()
           
 String getProtocol()
           
 String getQueryString()
           
 BufferedReader getReader()
           
 String getRealPath(String pPath)
           
 String getRemoteAddr()
           
 String getRemoteHost()
           
 int getRemotePort()
           
 String getRemoteUser()
           
 RequestDispatcher getRequestDispatcher(String pUri)
           
 String getRequestedSessionId()
           
 String getRequestURI()
           
 StringBuffer getRequestURL()
           
 String getScheme()
           
 String getServerName()
           
 int getServerPort()
           
 String getServletPath()
           
 HttpSession getSession()
           
 HttpSession getSession(boolean pCreate)
           
 Principal getUserPrincipal()
           
 boolean isRequestedSessionIdFromCookie()
           
 boolean isRequestedSessionIdFromUrl()
           
 boolean isRequestedSessionIdFromURL()
           
 boolean isRequestedSessionIdValid()
           
 boolean isSecure()
           
 boolean isUserInRole(String pRole)
           
protected  void parseParameters()
           
 void readHttpHeaders()
          Read the header lines, one by one.
protected  String readLine(byte[] pBuffer)
           
 void removeAttribute(String pKey)
           
 void setAttribute(String pKey, Object pValue)
           
 void setCharacterEncoding(String pEncoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.Exception
Read the header lines, one by one. Note, that the size of the buffer is a limitation of the maximum header length!

Throws:
IOException
ServletWebServer.Exception

readLine

protected String readLine(byte[] pBuffer)
                   throws IOException
Throws:
IOException

addHeader

protected void addHeader(String pHeader,
                         String pValue)

getAuthType

public String getAuthType()

getContextPath

public String getContextPath()

getCookies

public Cookie[] getCookies()

getDateHeader

public long getDateHeader(String arg0)

getHeader

public String getHeader(String pHeader)

getHeaderNames

public Enumeration getHeaderNames()

getHeaders

public Enumeration getHeaders(String pHeader)

getIntHeader

public int getIntHeader(String pHeader)

getMethod

public String getMethod()

getPathInfo

public String getPathInfo()

getPathTranslated

public String getPathTranslated()

getQueryString

public String getQueryString()

getRemoteUser

public String getRemoteUser()

getRequestURI

public String getRequestURI()

getRequestURL

public StringBuffer getRequestURL()

getRequestedSessionId

public String getRequestedSessionId()

getServletPath

public String getServletPath()

getSession

public HttpSession getSession()

getSession

public HttpSession getSession(boolean pCreate)

getUserPrincipal

public Principal getUserPrincipal()

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()

isUserInRole

public boolean isUserInRole(String pRole)

getAttribute

public Object getAttribute(String pKey)

getAttributeNames

public Enumeration getAttributeNames()

getCharacterEncoding

public String getCharacterEncoding()

setCharacterEncoding

public void setCharacterEncoding(String pEncoding)

getContentLength

public int getContentLength()

getContentType

public String getContentType()

getInputStream

public ServletInputStream getInputStream()
                                  throws IOException
Throws:
IOException

getLocale

public Locale getLocale()

getLocales

public Enumeration getLocales()

parseParameters

protected void parseParameters()

getParameter

public String getParameter(String pName)

getParameterMap

public Map getParameterMap()

getParameterNames

public Enumeration getParameterNames()

getParameterValues

public String[] getParameterValues(String pName)

getProtocol

public String getProtocol()

getReader

public BufferedReader getReader()
                         throws IOException
Throws:
IOException

getRealPath

public String getRealPath(String pPath)

getLocalAddr

public String getLocalAddr()

getLocalName

public String getLocalName()

getLocalPort

public int getLocalPort()

getRemoteAddr

public String getRemoteAddr()

getRemoteHost

public String getRemoteHost()

getRemotePort

public int getRemotePort()

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(String pUri)

getScheme

public String getScheme()

getServerName

public String getServerName()

getServerPort

public int getServerPort()

isSecure

public boolean isSecure()

removeAttribute

public void removeAttribute(String pKey)

setAttribute

public void setAttribute(String pKey,
                         Object pValue)

getHttpVersion

protected String getHttpVersion()


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.