Class WebSocketRequest
- java.lang.Object
-
- org.apache.wicket.request.Request
-
- org.apache.wicket.request.http.WebRequest
-
- org.apache.wicket.protocol.http.servlet.ServletWebRequest
-
- org.apache.wicket.protocol.ws.api.WebSocketRequest
-
public class WebSocketRequest extends ServletWebRequest
AWebRequest
implementation used for the lifecycle of a web socket connection. It keeps a copy of the HttpServletRequest provided by the web container during the creation of the web socket connection (the http upgrade).- Since:
- 6.0
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.request.http.WebRequest
HEADER_AJAX, HEADER_AJAX_BASE_URL, HEADER_ORIGIN, HEADER_REFERER, PARAM_AJAX, PARAM_AJAX_BASE_URL, PARAM_AJAX_REQUEST_ANTI_CACHE
-
-
Constructor Summary
Constructors Constructor Description WebSocketRequest(javax.servlet.http.HttpServletRequest req, String filterPrefix)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAjax()
Returns whether this request is an Ajax request.-
Methods inherited from class org.apache.wicket.protocol.http.servlet.ServletWebRequest
cloneWithUrl, generatePostParameters, getCharset, getClientUrl, getContainerRequest, getContextPath, getCookies, getDateHeader, getFilterPath, getFilterPrefix, getHeader, getHeaders, getLocale, getPostParameters, getPrefixToContextPath, getUrl, newMultipartWebRequest, newMultipartWebRequest, shouldPreserveClientUrl
-
Methods inherited from class org.apache.wicket.request.http.WebRequest
getCookie, getIfModifiedSinceHeader
-
Methods inherited from class org.apache.wicket.request.Request
getOriginalUrl, getQueryParameters, getRequestParameters
-
-
-
-
Constructor Detail
-
WebSocketRequest
public WebSocketRequest(javax.servlet.http.HttpServletRequest req, String filterPrefix)
Constructor.- Parameters:
req
- the copy of the HttpServletRequest used for the upgrade of the HTTP protocol
-
-
Method Detail
-
isAjax
public boolean isAjax()
Description copied from class:WebRequest
Returns whether this request is an Ajax request. This implementation checks for values of "wicket-ajax" url parameter or the "Wicket-Ajax" header. Subclasses can use other approaches.- Overrides:
isAjax
in classWebRequest
- Returns:
true
if this request is an ajax request,false
otherwise.
-
-