Class BackendConfiguration


  • public class BackendConfiguration
    extends Object
    This configuration might be useful, when Grizzly HttpServer is running behind an HTTP gateway like reverse proxy, load balancer etc... In this situation the HTTP gateway may preprocess initial HTTP request headers, examine them and forward modified HTTP request to a Grizzly HttpServer. For example HTTP request received via HTTPS might be forwarded using plain HTTP (for performance reason), so the protocol and client authentication might be lost when the HTTP request reaches Grizzly HttpServer. Using this configuration object, it's possible to instruct Grizzly HttpServer to use custom HTTP request headers to get information about original protocol used by client, user authentication information etc...
    Since:
    2.3.18
    Author:
    Alexey Stashok
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getRemoteUserMapping()
      Returns the HTTP request header name, whose value (if non-null) would be used to set the name of the remote user that has been authenticated for HTTP Request.
      String getScheme()
      Returns the HTTP request scheme, which if non-null overrides default one picked up by framework during request processing.
      String getSchemeMapping()
      Returns the HTTP request header name, whose value (if non-null) would be used to override default protocol scheme picked up by framework during request processing.
      void setRemoteUserMapping​(String remoteUserMapping)
      Sets the HTTP request header name, whose value (if non-null) would be used to set the name of the remote user that has been authenticated for HTTP Request.
      void setScheme​(String scheme)
      Sets the HTTP request scheme, which if non-null overrides default one picked up by framework during request processing.
      void setSchemeMapping​(String schemeMapping)
      Sets the HTTP request header name, whose value (if non-null) would be used to override default protocol scheme picked up by framework during request processing.
    • Constructor Detail

      • BackendConfiguration

        public BackendConfiguration()
    • Method Detail

      • getScheme

        public String getScheme()
        Returns the HTTP request scheme, which if non-null overrides default one picked up by framework during request processing.
      • setScheme

        public void setScheme​(String scheme)
        Sets the HTTP request scheme, which if non-null overrides default one picked up by framework during request processing. Pls. note this method resets schemeMapping property if any was set before.
      • getSchemeMapping

        public String getSchemeMapping()
        Returns the HTTP request header name, whose value (if non-null) would be used to override default protocol scheme picked up by framework during request processing.
      • setSchemeMapping

        public void setSchemeMapping​(String schemeMapping)
        Sets the HTTP request header name, whose value (if non-null) would be used to override default protocol scheme picked up by framework during request processing. Pls. note this method resets scheme property if any was set before.
      • getRemoteUserMapping

        public String getRemoteUserMapping()
        Returns the HTTP request header name, whose value (if non-null) would be used to set the name of the remote user that has been authenticated for HTTP Request.
        See Also:
        Request.getRemoteUser()
      • setRemoteUserMapping

        public void setRemoteUserMapping​(String remoteUserMapping)
        Sets the HTTP request header name, whose value (if non-null) would be used to set the name of the remote user that has been authenticated for HTTP Request.
        See Also:
        Request.getRemoteUser()