Package io.gravitee.gateway.api
Interface Request
- All Superinterfaces:
ReadStream<Buffer>
- All Known Implementing Classes:
RequestWrapper
Represents a server-side HTTP request.
- Author:
- David BRASSELY (david.brassely at graviteesource.com), GraviteeSource Team
-
Method Summary
Modifier and TypeMethodDescriptioncloseHandler(Handler<Void> closeHandler) Returns the portion of the request URI that indicates the context of the request.customFrameHandler(Handler<HttpFrame> frameHandler) For HTTP/2 requestbooleanended()headers()host()Allows to retrieve the request host.id()booleanReturns the Internet Protocol (IP) address of the interface on which the request was received.io.gravitee.common.http.HttpMethodmethod()io.gravitee.reporter.api.http.Metricsmetrics()path()Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.pathInfo()Return thepathwithout thecontext-path.Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.scheme()Returns the timeout handlertimeoutHandler(Handler<Long> timeoutHandler) Define anHandlerwhen the request timeout has been reachedlongThe timestamp for when this request was received.Propagated transaction id between multiple requests.uri()The URL the client used to make the request.io.gravitee.common.http.HttpVersionversion()Methods inherited from interface io.gravitee.gateway.api.stream.ReadStream
bodyHandler, endHandler, pause, resume
-
Method Details
-
id
String id() -
transactionId
String transactionId()Propagated transaction id between multiple requests.- Returns:
- Transaction ID.
-
uri
String uri()The URL the client used to make the request.- Returns:
- the URI of the request.
-
path
String path()Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.- Returns:
- The path part of the uri.
-
pathInfo
String pathInfo()Return thepathwithout thecontext-path.- Returns:
-
contextPath
String contextPath()Returns the portion of the request URI that indicates the context of the request.- Returns:
-
parameters
- Returns:
- the query parameters in the request
-
pathParameters
- Returns:
- the path parameters in the request
-
headers
HttpHeaders headers()- Returns:
- the headers in the request.
-
method
io.gravitee.common.http.HttpMethod method()- Returns:
- the HTTP method for the request.
-
scheme
String scheme() -
version
io.gravitee.common.http.HttpVersion version()- Returns:
- the HTTP version of the request
-
timestamp
long timestamp()The timestamp for when this request was received. Specifically, this is the timestamp of creation of the request object.- Returns:
- the instant timestamp for the request.
-
remoteAddress
String remoteAddress()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Returns:
- a
Stringcontaining the IP address of the client that sent the request.
-
localAddress
String localAddress()Returns the Internet Protocol (IP) address of the interface on which the request was received.- Returns:
- a
Stringcontaining the IP address on which the request was received.
-
sslSession
SSLSession sslSession()- Returns:
- SSLSession associated to the request. Returns
nullif not an SSL connection. - See Also:
-
metrics
io.gravitee.reporter.api.http.Metrics metrics() -
ended
boolean ended() -
timeoutHandler
Define anHandlerwhen the request timeout has been reached- Parameters:
timeoutHandler- The handler to call when the timeout has been reached- Returns:
- The current request
-
timeoutHandler
Returns the timeout handler- Returns:
-
isWebSocket
boolean isWebSocket() -
websocket
WebSocket websocket() -
customFrameHandler
For HTTP/2 request- Parameters:
frameHandler- The handler to call when getting a custom HTTP Frame- Returns:
-
closeHandler
- Parameters:
closeHandler- The handler to call when the underlying connection is closed- Returns:
- the request
-
host
String host()Allows to retrieve the request host. This method should be preferred over retrieving the host from http headers.- Returns:
- the host.
-