Class DefaultWebRequestContext
java.lang.Object
io.fluxzero.sdk.web.DefaultWebRequestContext
- All Implemented Interfaces:
WebRequestContext
Default implementation of
WebRequestContext for Fluxzero web request messages.
This context exposes the request path, origin, and parameter sources needed by web handler resolution without depending on an external HTTP router implementation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultWebRequestContextReturns the currentDefaultWebRequestContextfrom the activeDeserializingMessage, ornullif no such message is available.Map<String, List<WebFormPart>> com.fasterxml.jackson.databind.JsonNodegetParameter(String name, WebParameterSource... sources) Retrieves the value of a specified parameter from the given sources in a web request.getUri()static DefaultWebRequestContextgetWebRequestContext(DeserializingMessage message) Creates or retrieves aDefaultWebRequestContextfrom the givenDeserializingMessage.booleanbooleanmatchesAny(Collection<String> urlPatterns) pathMap()setPathMap(Map<String, String> pathMap) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WebRequestContext
getBodyParameter, getCookieParameter, getFormParameter, getHeaderParameter, getParameter, getPathParameter, getQueryParameter
-
Method Details
-
getCurrentWebRequestContext
Returns the currentDefaultWebRequestContextfrom the activeDeserializingMessage, ornullif no such message is available. -
getWebRequestContext
Creates or retrieves aDefaultWebRequestContextfrom the givenDeserializingMessage. -
pathMap
-
getMetadata
-
getUri
-
getPathMap
-
getQueryParameters
-
getCookieMap
-
getFormParameters
-
getFormParts
-
getJsonBody
public com.fasterxml.jackson.databind.JsonNode getJsonBody() -
setPathMap
-
getParameter
Description copied from interface:WebRequestContextRetrieves the value of a specified parameter from the given sources in a web request.- Specified by:
getParameterin interfaceWebRequestContext- Parameters:
name- the name of the parameter to retrieve. Must not be null.sources- the sources to look for the parameter, such as PATH, QUERY, HEADER, COOKIE, or FORM. If no sources are provided, the method may default to a predefined set of sources.- Returns:
- the
ParameterValueassociated with the specified parameter name and sources, or an emptyParameterValueif the parameter is not found.
-
matches
-
matchesAny
-