Interface ConnectionInformation

All Known Subinterfaces:
HttpServerInfos, HttpServerRequest, HttpServerResponse

public interface ConnectionInformation
Resolve information about the connection from which an http request is received.
Since:
1.0.26
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable SocketAddress
    Returns the address of the host which received the request, possibly null in case of Unix Domain Sockets.
    @Nullable SocketAddress
    Returns the address of the client that initiated the request, possibly null in case of Unix Domain Sockets.
    Returns the current protocol scheme.
    @Nullable SocketAddress
    Returns the address of the host which received the request, possibly null in case of Unix Domain Sockets.
    Returns the host name derived from the Host/X-Forwarded-Host/Forwarded header associated with this request.
    int
    Returns the host port derived from the Host/X-Forwarded-*/Forwarded header associated with this request.
    @Nullable SocketAddress
    Returns the address of the client that initiated the request, possibly null in case of Unix Domain Sockets.
    Returns the current protocol scheme.
  • Method Details

    • hostAddress

      @Nullable SocketAddress hostAddress()
      Returns the address of the host which received the request, possibly null in case of Unix Domain Sockets. The returned address is the merged information from all proxies.
      Returns:
      the address merged from all proxies of the host which received the request
    • connectionHostAddress

      @Nullable SocketAddress connectionHostAddress()
      Returns the address of the host which received the request, possibly null in case of Unix Domain Sockets.
      Returns:
      the address of the host which received the request
    • remoteAddress

      @Nullable SocketAddress remoteAddress()
      Returns the address of the client that initiated the request, possibly null in case of Unix Domain Sockets. The returned address is the merged information from all proxies.
      Returns:
      the address merged from all proxies of the client that initiated the request
    • connectionRemoteAddress

      @Nullable SocketAddress connectionRemoteAddress()
      Returns the address of the client that initiated the request, possibly null in case of Unix Domain Sockets.
      Returns:
      the address of the client that initiated the request
    • scheme

      String scheme()
      Returns the current protocol scheme. The returned address is the merged information from all proxies.
      Returns:
      the protocol scheme merged from all proxies
    • connectionScheme

      String connectionScheme()
      Returns the current protocol scheme.
      Returns:
      the protocol scheme
    • hostName

      String hostName()
      Returns the host name derived from the Host/X-Forwarded-Host/Forwarded header associated with this request.
      Returns:
      the host name derived from the Host/X-Forwarded-Host/Forwarded header associated with this request.
      Since:
      1.0.29
    • hostPort

      int hostPort()
      Returns the host port derived from the Host/X-Forwarded-*/Forwarded header associated with this request.
      Returns:
      the host port derived from the Host/X-Forwarded-*/Forwarded header associated with this request.
      Since:
      1.0.29