Class UndertowWebSocketRequest
java.lang.Object
dev.voidframework.web.server.http.UndertowWebSocketRequest
- All Implemented Interfaces:
WebSocketRequest
Undertow
WebSocketRequest implementation.- Since:
- 1.3.0
-
Constructor Summary
ConstructorsConstructorDescriptionUndertowWebSocketRequest(io.undertow.websockets.spi.WebSocketHttpExchange webSocketHttpExchange) Build a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptContentType(String contentType) Checks if the current request accept a specific content type.Returns a single header.Returns all headers.Returns the query string, without the leading "?".getQueryStringParameter(String parameterName) Returns the query string parameter value.getQueryStringParameter(String parameterName, String fallbackValue) Returns the query string parameter value.Returns all query string parameters.Returns the original request URI.
-
Constructor Details
-
UndertowWebSocketRequest
public UndertowWebSocketRequest(io.undertow.websockets.spi.WebSocketHttpExchange webSocketHttpExchange) Build a new instance.- Parameters:
webSocketHttpExchange- Current WebSocket server exchange- Since:
- 1.3.0
-
-
Method Details
-
acceptContentType
Description copied from interface:WebSocketRequestChecks if the current request accept a specific content type.- Specified by:
acceptContentTypein interfaceWebSocketRequest- Parameters:
contentType- The content type- Returns:
trueif the content type is accepted, otherwise,false
-
getHeader
Description copied from interface:WebSocketRequestReturns a single header.- Specified by:
getHeaderin interfaceWebSocketRequest- Parameters:
headerName- The header name- Returns:
- The requested header value, otherwise, a null value
-
getHeaders
Description copied from interface:WebSocketRequestReturns all headers.- Specified by:
getHeadersin interfaceWebSocketRequest- Returns:
- All headers
-
getQueryString
Description copied from interface:WebSocketRequestReturns the query string, without the leading "?".- Specified by:
getQueryStringin interfaceWebSocketRequest- Returns:
- The query string
-
getQueryStringParameters
Description copied from interface:WebSocketRequestReturns all query string parameters.- Specified by:
getQueryStringParametersin interfaceWebSocketRequest- Returns:
- All query string parameters
-
getQueryStringParameter
Description copied from interface:WebSocketRequestReturns the query string parameter value. If the parameter does not exist, null value will be returned.- Specified by:
getQueryStringParameterin interfaceWebSocketRequest- Parameters:
parameterName- The parameter name- Returns:
- The query string parameter value
-
getQueryStringParameter
Description copied from interface:WebSocketRequestReturns the query string parameter value. If the parameter does not exist or associated value is blank, fallback value will be returned.- Specified by:
getQueryStringParameterin interfaceWebSocketRequest- Parameters:
parameterName- The parameter namefallbackValue- The value to use if the parameter does not exist or associated value is blank- Returns:
- The query string parameter value
-
getRequestURI
Description copied from interface:WebSocketRequestReturns the original request URI. This is not decoded in any way, and does not include the query string.- Specified by:
getRequestURIin interfaceWebSocketRequest- Returns:
- The request URI
-