Class ServerWebRequest
java.lang.Object
io.microsphere.spring.webflux.context.request.ServerWebRequest
- All Implemented Interfaces:
org.springframework.web.context.request.NativeWebRequest,org.springframework.web.context.request.RequestAttributes,org.springframework.web.context.request.WebRequest
public class ServerWebRequest
extends Object
implements org.springframework.web.context.request.NativeWebRequest
The adapter implementation of
NativeWebRequest based on ServerWebExchange- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
ServerWebExchangeServerHttpRequestServerHttpResponseNativeWebRequest
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe reference key of the request.static final StringThe reference key of the response.static final StringThe reference key of the session.static final StringThe attribute name of the remote user in the request : "REMOTE_USER" .static final StringThe attribute name of the mutex for the session, used for synchronization on the session.Fields inherited from interface org.springframework.web.context.request.RequestAttributes
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_REQUEST, SCOPE_SESSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckNotModified(long lastModifiedTimestamp) booleancheckNotModified(String etag) booleancheckNotModified(String etag, long lastModifiedTimestamp) getAttribute(String name, int scope) String[]getAttributeNames(int scope) getDescription(boolean includeClientInfo) org.springframework.web.server.ServerWebExchangeGet theServerWebExchangeString[]getHeaderValues(String headerName) <T> TgetNativeRequest(Class<T> requiredType) <T> TgetNativeResponse(Class<T> requiredType) getParameter(String paramName) String[]getParameterValues(String paramName) Get a read-only map with parsed and decoded query parameter values.org.springframework.http.server.reactive.ServerHttpRequestGet theServerHttpRequestorg.springframework.http.HttpHeadersGet theHttpHeadersorg.springframework.http.server.reactive.ServerHttpResponseGet theServerHttpResponseorg.springframework.web.server.WebSessionbooleanisSecure()booleanisUserInRole(String role) voidregisterDestructionCallback(String name, Runnable callback, int scope) voidremoveAttribute(String name, int scope) resolveReference(String key) voidsetAttribute(String name, Object value, int scope) protected String[]
-
Field Details
-
REMOTE_USER_ATTRIBUTE_NAME
The attribute name of the remote user in the request : "REMOTE_USER" .- See Also:
-
SESSION_MUTEX_ATTRIBUTE_NAME
The attribute name of the mutex for the session, used for synchronization on the session.- See Also:
-
WebUtils.SESSION_MUTEX_ATTRIBUTE- Constant Field Values
-
REFERENCE_KEY_REQUEST
The reference key of the request. -
REFERENCE_KEY_RESPONSE
The reference key of the response. -
REFERENCE_KEY_SESSION
The reference key of the session.
-
-
Constructor Details
-
ServerWebRequest
public ServerWebRequest(org.springframework.web.server.ServerWebExchange exchange)
-
-
Method Details
-
getNativeRequest
- Specified by:
getNativeRequestin interfaceorg.springframework.web.context.request.NativeWebRequest
-
getNativeResponse
- Specified by:
getNativeResponsein interfaceorg.springframework.web.context.request.NativeWebRequest
-
getNativeRequest
- Specified by:
getNativeRequestin interfaceorg.springframework.web.context.request.NativeWebRequest
-
getNativeResponse
- Specified by:
getNativeResponsein interfaceorg.springframework.web.context.request.NativeWebRequest
-
getHeader
- Specified by:
getHeaderin interfaceorg.springframework.web.context.request.WebRequest
-
getHeaderValues
- Specified by:
getHeaderValuesin interfaceorg.springframework.web.context.request.WebRequest
-
getHeaderNames
- Specified by:
getHeaderNamesin interfaceorg.springframework.web.context.request.WebRequest
-
getParameter
- Specified by:
getParameterin interfaceorg.springframework.web.context.request.WebRequest
-
getParameterValues
- Specified by:
getParameterValuesin interfaceorg.springframework.web.context.request.WebRequest
-
getParameterNames
- Specified by:
getParameterNamesin interfaceorg.springframework.web.context.request.WebRequest
-
getParameterMap
- Specified by:
getParameterMapin interfaceorg.springframework.web.context.request.WebRequest
-
getLocale
- Specified by:
getLocalein interfaceorg.springframework.web.context.request.WebRequest
-
getContextPath
- Specified by:
getContextPathin interfaceorg.springframework.web.context.request.WebRequest
-
getRemoteUser
- Specified by:
getRemoteUserin interfaceorg.springframework.web.context.request.WebRequest
-
getUserPrincipal
- Specified by:
getUserPrincipalin interfaceorg.springframework.web.context.request.WebRequest
-
isUserInRole
- Specified by:
isUserInRolein interfaceorg.springframework.web.context.request.WebRequest
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceorg.springframework.web.context.request.WebRequest
-
checkNotModified
public boolean checkNotModified(long lastModifiedTimestamp) - Specified by:
checkNotModifiedin interfaceorg.springframework.web.context.request.WebRequest
-
checkNotModified
- Specified by:
checkNotModifiedin interfaceorg.springframework.web.context.request.WebRequest
-
checkNotModified
- Specified by:
checkNotModifiedin interfaceorg.springframework.web.context.request.WebRequest
-
getDescription
- Specified by:
getDescriptionin interfaceorg.springframework.web.context.request.WebRequest
-
getAttribute
- Specified by:
getAttributein interfaceorg.springframework.web.context.request.RequestAttributes
-
setAttribute
- Specified by:
setAttributein interfaceorg.springframework.web.context.request.RequestAttributes
-
removeAttribute
- Specified by:
removeAttributein interfaceorg.springframework.web.context.request.RequestAttributes
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceorg.springframework.web.context.request.RequestAttributes
-
registerDestructionCallback
- Specified by:
registerDestructionCallbackin interfaceorg.springframework.web.context.request.RequestAttributes
-
resolveReference
- Specified by:
resolveReferencein interfaceorg.springframework.web.context.request.RequestAttributes
-
getSessionId
- Specified by:
getSessionIdin interfaceorg.springframework.web.context.request.RequestAttributes
-
getSessionMutex
- Specified by:
getSessionMutexin interfaceorg.springframework.web.context.request.RequestAttributes
-
getExchange
@Nonnull public org.springframework.web.server.ServerWebExchange getExchange()Get theServerWebExchange- Returns:
- the
ServerWebExchange
-
getRequest
@Nonnull public org.springframework.http.server.reactive.ServerHttpRequest getRequest()Get theServerHttpRequest- Returns:
- the
ServerHttpRequest
-
getResponse
@Nonnull public org.springframework.http.server.reactive.ServerHttpResponse getResponse()Get theServerHttpResponse- Returns:
- the
ServerHttpResponse
-
getRequestHeaders
@Nonnull public org.springframework.http.HttpHeaders getRequestHeaders()Get theHttpHeaders- Returns:
- the mutable
HttpHeaders
-
getQueryParams
Get a read-only map with parsed and decoded query parameter values.- Returns:
- a read-only map with parsed and decoded query parameter values
-
getSession
@Nonnull public org.springframework.web.server.WebSession getSession() -
toArray
-