HttpServerRequestAdapter
protected static class BeelineServletFilter.HttpServerRequestAdapter extends Object implements HttpServerRequestAdapter
Modifier | Constructor | Description |
---|---|---|
protected |
HttpServerRequestAdapter(javax.servlet.http.HttpServletRequest request) |
Modifier and Type | Method | Description |
---|---|---|
int |
getContentLength() |
Return the length in bytes of the request body.
|
Optional<String> |
getFirstHeader(String name) |
Return the first header value for the header name.
|
Optional<String> |
getHost() |
Return the host in the request.
|
String |
getHttpVersion() |
Returns the name and version of the HTTP protocol.
|
String |
getMethod() |
Returns the HTTP method of the request.
|
Optional<String> |
getPath() |
Returns the path requested.
|
Map<String,List<String>> |
getQueryParams() |
Return the map of query parameters.
|
String |
getRemoteAddress() |
Returns the IP address of the client (or final proxy) that sent the request.
|
Optional<String> |
getScheme() |
Return the URI scheme used in the request.
|
boolean |
isSecure() |
Indicates whether this request used a secure channel, e.g.
|
protected HttpServerRequestAdapter(javax.servlet.http.HttpServletRequest request)
public String getMethod()
HttpServerRequestAdapter
getMethod
in interface HttpServerRequestAdapter
public Optional<String> getPath()
HttpServerRequestAdapter
getPath
in interface HttpServerRequestAdapter
Optional.empty()
if the path is undefinedpublic Optional<String> getFirstHeader(String name)
HttpServerRequestAdapter
getFirstHeader
in interface HttpServerRequestAdapter
name
- the header nameOptional.empty()
if nonepublic Optional<String> getScheme()
HttpServerRequestAdapter
getScheme
in interface HttpServerRequestAdapter
Optional.empty()
if not available.public Optional<String> getHost()
HttpServerRequestAdapter
getHost
in interface HttpServerRequestAdapter
Optional.empty()
if not available.public String getHttpVersion()
HttpServerRequestAdapter
getHttpVersion
in interface HttpServerRequestAdapter
public boolean isSecure()
HttpServerRequestAdapter
isSecure
in interface HttpServerRequestAdapter
public String getRemoteAddress()
HttpServerRequestAdapter
getRemoteAddress
in interface HttpServerRequestAdapter
public Map<String,List<String>> getQueryParams()
HttpServerRequestAdapter
getQueryParams
in interface HttpServerRequestAdapter
public int getContentLength()
HttpServerRequestAdapter
getContentLength
in interface HttpServerRequestAdapter
Copyright © 2019–2020 Honeycomb. All rights reserved.