Class TLfnEventSourceRequest
java.lang.Object
com.luciad.fusion.platform.event.object.request.TLfnEventSourceRequest
Class representing an HTTP request which triggered an event.
This class captures and retains some request information beyond the lifetime of the request.
This in contrast to HttpServletRequest
and TLcdHttpServletRequestKVPRequestWrapper
where this information could no longer be available when the HTTP request has been handled. This is useful, for example,
when working with events that are handled asynchronously. In an asynchronous event handler there is no guarantee that
the HTTP request is still in progress.
- Since:
- 2022.1
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Returns the JSON or XML body of this request.Returns the MIME type of the body of the request, orOptional.empty()
if the type is not known.Returns a map containing the Http headers of the request.Returns the HTTP method (GET, POST, PUT, DELETE, and so on) used to perform the requestReturns the Internet Protocol (IP) address of the client or last proxy that sent the request.Returns theURI
the client used to make the request.toString()
-
Method Details
-
getHttpMethod
Returns the HTTP method (GET, POST, PUT, DELETE, and so on) used to perform the request- Returns:
- a String containing the HTTP method used to perform the request
-
getRequestUri
Returns theURI
the client used to make the request. The returnedURI
contains a scheme, host, port number (if different from the standard HTTP(S) port), context path and query string.- Returns:
- the
URI
the client used to make the request.
-
getContentType
Returns the MIME type of the body of the request, orOptional.empty()
if the type is not known.- Returns:
- a
String
containing the name of the MIME type of the request, orOptional.empty()
if the type is not known.
-
getBody
Returns the JSON or XML body of this request. ReturnsOptional.empty()
if the request does not contain a JSON or XML body. Note that the body returned by this method will be limited to the first few kilobytes of the actual content of the request.- Returns:
- the request's body
-
getHeaders
Returns a map containing the Http headers of the request.- Returns:
- a map containing the Http headers of the request.
-
getRemoteAddress
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Returns:
- the IP address of the client or last proxy that sent the request.
- Since:
- 2024.1
-
toString
-