Package io.gravitee.gateway.api
Class RequestWrapper
java.lang.Object
io.gravitee.gateway.api.RequestWrapper
- All Implemented Interfaces:
Request,ReadStream<Buffer>
- Author:
- David BRASSELY (david.brassely at graviteesource.com), GraviteeSource Team
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbodyHandler(Handler<Buffer> bodyHandler) closeHandler(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()endHandler(Handler<Void> endHandler) 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.pause()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.resume()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()
-
Field Details
-
request
-
-
Constructor Details
-
RequestWrapper
-
-
Method Details
-
bodyHandler
- Specified by:
bodyHandlerin interfaceReadStream<Buffer>
-
endHandler
- Specified by:
endHandlerin interfaceReadStream<Buffer>
-
pause
- Specified by:
pausein interfaceReadStream<Buffer>
-
resume
- Specified by:
resumein interfaceReadStream<Buffer>
-
id
-
transactionId
Description copied from interface:RequestPropagated transaction id between multiple requests.- Specified by:
transactionIdin interfaceRequest- Returns:
- Transaction ID.
-
uri
Description copied from interface:RequestThe URL the client used to make the request. -
path
Description copied from interface:RequestReturns 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
Description copied from interface:RequestReturn thepathwithout thecontext-path. -
contextPath
Description copied from interface:RequestReturns the portion of the request URI that indicates the context of the request.- Specified by:
contextPathin interfaceRequest- Returns:
-
parameters
- Specified by:
parametersin interfaceRequest- Returns:
- the query parameters in the request
-
pathParameters
- Specified by:
pathParametersin interfaceRequest- Returns:
- the path parameters in the request
-
headers
-
method
public io.gravitee.common.http.HttpMethod method() -
scheme
-
version
public io.gravitee.common.http.HttpVersion version() -
timestamp
public long timestamp()Description copied from interface:RequestThe timestamp for when this request was received. Specifically, this is the timestamp of creation of the request object. -
remoteAddress
Description copied from interface:RequestReturns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Specified by:
remoteAddressin interfaceRequest- Returns:
- a
Stringcontaining the IP address of the client that sent the request.
-
localAddress
Description copied from interface:RequestReturns the Internet Protocol (IP) address of the interface on which the request was received.- Specified by:
localAddressin interfaceRequest- Returns:
- a
Stringcontaining the IP address on which the request was received.
-
metrics
public io.gravitee.reporter.api.http.Metrics metrics() -
sslSession
- Specified by:
sslSessionin interfaceRequest- Returns:
- SSLSession associated to the request. Returns
nullif not an SSL connection. - See Also:
-
ended
public boolean ended() -
timeoutHandler
Description copied from interface:RequestDefine anHandlerwhen the request timeout has been reached- Specified by:
timeoutHandlerin interfaceRequest- Parameters:
timeoutHandler- The handler to call when the timeout has been reached- Returns:
- The current request
-
timeoutHandler
Description copied from interface:RequestReturns the timeout handler- Specified by:
timeoutHandlerin interfaceRequest- Returns:
-
isWebSocket
public boolean isWebSocket()- Specified by:
isWebSocketin interfaceRequest
-
websocket
-
customFrameHandler
Description copied from interface:RequestFor HTTP/2 request- Specified by:
customFrameHandlerin interfaceRequest- Parameters:
frameHandler- The handler to call when getting a custom HTTP Frame- Returns:
-
closeHandler
- Specified by:
closeHandlerin interfaceRequest- Parameters:
closeHandler- The handler to call when the underlying connection is closed- Returns:
- the request
-
host
Description copied from interface:RequestAllows to retrieve the request host. This method should be preferred over retrieving the host from http headers.
-