org.apache.xmlrpc.webserver

Class HttpServletRequestImpl

public class HttpServletRequestImpl extends Object implements HttpServletRequest

Stub implementation of a {@link javax.servlet.http.HttpServletRequest} with lots of unimplemented methods. I implemented only those, which are required for testing the {@link org.apache.xmlrpc.webserver.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 voidaddHeader(String pHeader, String pValue)
ObjectgetAttribute(String pKey)
EnumerationgetAttributeNames()
StringgetAuthType()
StringgetCharacterEncoding()
intgetContentLength()
StringgetContentType()
StringgetContextPath()
Cookie[]getCookies()
longgetDateHeader(String arg0)
StringgetHeader(String pHeader)
EnumerationgetHeaderNames()
EnumerationgetHeaders(String pHeader)
protected StringgetHttpVersion()
ServletInputStreamgetInputStream()
intgetIntHeader(String pHeader)
StringgetLocalAddr()
LocalegetLocale()
EnumerationgetLocales()
StringgetLocalName()
intgetLocalPort()
StringgetMethod()
StringgetParameter(String pName)
MapgetParameterMap()
EnumerationgetParameterNames()
String[]getParameterValues(String pName)
StringgetPathInfo()
StringgetPathTranslated()
StringgetProtocol()
StringgetQueryString()
BufferedReadergetReader()
StringgetRealPath(String pPath)
StringgetRemoteAddr()
StringgetRemoteHost()
intgetRemotePort()
StringgetRemoteUser()
RequestDispatchergetRequestDispatcher(String pUri)
StringgetRequestedSessionId()
StringgetRequestURI()
StringBuffergetRequestURL()
StringgetScheme()
StringgetServerName()
intgetServerPort()
StringgetServletPath()
HttpSessiongetSession()
HttpSessiongetSession(boolean pCreate)
PrincipalgetUserPrincipal()
booleanisRequestedSessionIdFromCookie()
booleanisRequestedSessionIdFromUrl()
booleanisRequestedSessionIdFromURL()
booleanisRequestedSessionIdValid()
booleanisSecure()
booleanisUserInRole(String pRole)
protected voidparseParameters()
protected StringreadLine(byte[] pBuffer)
Read the header lines, one by one.
voidremoveAttribute(String pKey)
voidsetAttribute(String pKey, Object pValue)
voidsetCharacterEncoding(String pEncoding)

Constructor Detail

HttpServletRequestImpl

public HttpServletRequestImpl(Socket pSocket)
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

addHeader

protected void addHeader(String pHeader, String pValue)

getAttribute

public Object getAttribute(String pKey)

getAttributeNames

public Enumeration getAttributeNames()

getAuthType

public String getAuthType()

getCharacterEncoding

public String getCharacterEncoding()

getContentLength

public int getContentLength()

getContentType

public String getContentType()

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)

getHttpVersion

protected String getHttpVersion()

getInputStream

public ServletInputStream getInputStream()

getIntHeader

public int getIntHeader(String pHeader)

getLocalAddr

public String getLocalAddr()

getLocale

public Locale getLocale()

getLocales

public Enumeration getLocales()

getLocalName

public String getLocalName()

getLocalPort

public int getLocalPort()

getMethod

public String getMethod()

getParameter

public String getParameter(String pName)

getParameterMap

public Map getParameterMap()

getParameterNames

public Enumeration getParameterNames()

getParameterValues

public String[] getParameterValues(String pName)

getPathInfo

public String getPathInfo()

getPathTranslated

public String getPathTranslated()

getProtocol

public String getProtocol()

getQueryString

public String getQueryString()

getReader

public BufferedReader getReader()

getRealPath

public String getRealPath(String pPath)

getRemoteAddr

public String getRemoteAddr()

getRemoteHost

public String getRemoteHost()

getRemotePort

public int getRemotePort()

getRemoteUser

public String getRemoteUser()

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(String pUri)

getRequestedSessionId

public String getRequestedSessionId()

getRequestURI

public String getRequestURI()

getRequestURL

public StringBuffer getRequestURL()

getScheme

public String getScheme()

getServerName

public String getServerName()

getServerPort

public int getServerPort()

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()

isSecure

public boolean isSecure()

isUserInRole

public boolean isUserInRole(String pRole)

parseParameters

protected void parseParameters()

readLine

protected String readLine(byte[] pBuffer)
Read the header lines, one by one. Note, that the size of the buffer is a limitation of the maximum header length!

removeAttribute

public void removeAttribute(String pKey)

setAttribute

public void setAttribute(String pKey, Object pValue)

setCharacterEncoding

public void setCharacterEncoding(String pEncoding)
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.