Package com.mendix.m2ee.api
Interface IMxRuntimeRequest
public interface IMxRuntimeRequest
This interface represents a request coming in to the runtime.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
This method is only here for backwards compatibility and should not be used.Returns the AppContainer corresponding to this request.Returns the value of the cookie.Returns the name of the file.Returns the file as a binary data stream.Returns the value of a header.javax.servlet.http.HttpServletRequest
Returns the HttpServletRequest underlying this runtime request.Returns the body of the request as a binary data stream.getParameter
(String paramName) Returns the parameter value.Returns the IP address of the client that sent the request.Returns the request serialized as a string.Returns the extra path information of this request, for example when the full URL is http://www.example.com/web/ui/index.htm, it returns /web/ui/index.htmlReturns the root URL of the application, based on the `ApplicationRootUrl` configuration setting and the request headers.boolean
Returns true if this request is a file upload.
-
Method Details
-
getRequestString
String getRequestString()Returns the request serialized as a string. -
getParameter
Returns the parameter value.- Parameters:
paramName
- the parameter name- Returns:
- the value of the parameter if it exists, otherwise null
-
getCookie
Returns the value of the cookie.- Parameters:
cookieName
- the name of the cookie- Returns:
- the value of the cookie if it exists, otherwise null
-
getCookie
-
isFileUpload
boolean isFileUpload()Returns true if this request is a file upload. -
getRemoteAddr
String getRemoteAddr()Returns the IP address of the client that sent the request. -
getInputStream
Returns the body of the request as a binary data stream.- Returns:
- the body of the request
- Throws:
IOException
- if an input or output exception occurs
-
getFileItemStream
Returns the file as a binary data stream.- Returns:
- the binary data stream
- Throws:
RuntimeException
- if the request is not a file uploadIOException
-
getFileItemName
String getFileItemName()Returns the name of the file.- Returns:
- the name of the file
- Throws:
RuntimeException
- if the request is not a file upload
-
getResourcePath
String getResourcePath()Returns the extra path information of this request, for example when the full URL is http://www.example.com/web/ui/index.htm, it returns /web/ui/index.html -
getRootUrl
String getRootUrl()Returns the root URL of the application, based on the `ApplicationRootUrl` configuration setting and the request headers. When `ApplicationRootUrl` is defined, its value is returned. Otherwise, this method tries to create a complete URL from X-Forwarded-* headers. If this is not possible, it falls back to the `Host` header and the `HttpServletRequest.isSecure` property. `X-Forwarded-Proto` is given priority over `X-Forwarded-Scheme`. `X-Forwarded-Host` is given priority over `X-Forwarded-Port`.- Returns:
- the root URL of the application
- Throws:
RuntimeException
- if no root URL can be determined
-
getHeader
Returns the value of a header.- Parameters:
header
- the header name- Returns:
- the value of the header
-
getContext
IAppContainer getContext()Returns the AppContainer corresponding to this request. -
getHttpServletRequest
javax.servlet.http.HttpServletRequest getHttpServletRequest()Returns the HttpServletRequest underlying this runtime request. -
createFingerprint
byte[] createFingerprint()This method is only here for backwards compatibility and should not be used.
-