Interface HttpBaseRequest
- All Superinterfaces:
BaseRequest
- All Known Subinterfaces:
GenericRequest,HttpMessageRequest,HttpPlainRequest,HttpRequest,HttpRequest,MessageRequest,Request,TcpRequest
Base interface for all http-based requests.
Defines the common information that can be accessed for any http-based requests.
- Author:
- Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com), GraviteeSource Team
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionPropagated client identifier between multiple requests.booleanended()Indicates if that request is ended or not meaning that all the request headers and the request body have been fully read.headers()host()Allows to retrieve the request host.id()Get the id assigned to this http request.Returns the Internet Protocol (IP) address of the interface on which the request was received.io.gravitee.common.http.HttpMethodmethod()Allows to retrieve the request original host.path()pathInfo()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.scheme()longThe timestamp for when this request was received.Propagated transaction id between multiple requests.uri()io.gravitee.common.http.HttpVersionversion()
-
Method Details
-
id
String id()Get the id assigned to this http request.- Returns:
- the id of the http request.
-
transactionId
String transactionId()Propagated transaction id between multiple requests.- Returns:
- Transaction ID.
-
clientIdentifier
String clientIdentifier()Propagated client identifier between multiple requests.- Returns:
- Client Identifier.
-
uri
String uri()- Returns:
- The URL the client used to make 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.
-
originalHost
String originalHost()Allows to retrieve the request original host. Unlike thehost(), it remains the same and can't be altered during the request processing.- Returns:
- the original reuqest host.
-
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.
-
pathInfo
String pathInfo()- Returns:
- the
pathwithout thecontext-path.
-
contextPath
String contextPath()- Returns:
- the portion of the request URI that indicates the context of the request.
-
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.
-
ended
boolean ended()Indicates if that request is ended or not meaning that all the request headers and the request body have been fully read.- Returns:
trueif the headers and body have been read,falseelse.
-
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.
-
tlsSession
TlsSession tlsSession()- Returns:
- TlsSession associated to the request. Acts as a SSLSession, with additional mechanisms. It can for example extract a client certificate from a given header.
- See Also:
-