Interface HttpBaseRequest

All Superinterfaces:
BaseRequest
All Known Subinterfaces:
GenericRequest, HttpMessageRequest, HttpPlainRequest, HttpRequest, HttpRequest, MessageRequest, Request, TcpRequest

public interface HttpBaseRequest extends BaseRequest
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 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 the host(), 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 path without the context-path.
    • contextPath

      String contextPath()
      Returns:
      the portion of the request URI that indicates the context of the request.
    • parameters

      io.gravitee.common.util.MultiValueMap<String,String> parameters()
      Returns:
      the query parameters in the request
    • pathParameters

      io.gravitee.common.util.MultiValueMap<String,String> 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:
      true if the headers and body have been read, false else.
    • remoteAddress

      String remoteAddress()
      Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.
      Returns:
      a String containing 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 String containing 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: