Package de.xima.fc.form.request
Class HttpServletRequestContext
- java.lang.Object
-
- de.xima.fc.form.request.HttpServletRequestContext
-
- All Implemented Interfaces:
IRequestContext
public final class HttpServletRequestContext extends Object implements IRequestContext
AnIRequestContext
backed by an actualHttpServletRequest
.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description HttpServletRequestContext(javax.servlet.http.HttpServletRequest request)
Wraps anHttpServletRequest
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getAttribute(String name)
Retrieves the attribute for the given name.String
getCharacterEncoding()
Retrieve the character encoding for the request.int
getContentLength()
Retrieve the content length of the request.String
getContentType()
Retrieve the content type of the request.InputStream
getInputStream()
Retrieve the input stream for the request.javax.servlet.ServletContext
getServletContext()
Retrieve the servlet context of the application.
-
-
-
Method Detail
-
getAttribute
public Object getAttribute(String name)
Description copied from interface:IRequestContext
Retrieves the attribute for the given name.- Specified by:
getAttribute
in interfaceIRequestContext
- Parameters:
name
- to retrieve request context attribute for.- Returns:
- the attribute or
null
if no attribute was found for the given name.
-
getCharacterEncoding
public String getCharacterEncoding()
Description copied from interface:IRequestContext
Retrieve the character encoding for the request.- Specified by:
getCharacterEncoding
in interfaceIRequestContext
- Returns:
- The character encoding for the request.
-
getContentLength
public int getContentLength()
Description copied from interface:IRequestContext
Retrieve the content length of the request.- Specified by:
getContentLength
in interfaceIRequestContext
- Returns:
- The content length of the request.
-
getContentType
public String getContentType()
Description copied from interface:IRequestContext
Retrieve the content type of the request.- Specified by:
getContentType
in interfaceIRequestContext
- Returns:
- The content type of the request.
-
getInputStream
public InputStream getInputStream() throws IOException
Description copied from interface:IRequestContext
Retrieve the input stream for the request.- Specified by:
getInputStream
in interfaceIRequestContext
- Returns:
- The input stream for the request.
- Throws:
IOException
- if a problem occurs.
-
getServletContext
public javax.servlet.ServletContext getServletContext()
Description copied from interface:IRequestContext
Retrieve the servlet context of the application.- Specified by:
getServletContext
in interfaceIRequestContext
- Returns:
- The servlet context of the application.
-
-