Class WebClientInfo

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.wicket.util.io.IClusterable

    public class WebClientInfo
    extends ClientInfo
    Default client info object for web applications.
    Author:
    Eelco Hillenius
    See Also:
    Serialized Form
    • Constructor Detail

      • WebClientInfo

        public WebClientInfo​(RequestCycle requestCycle)
        Construct.
        Parameters:
        requestCycle - the request cycle
      • WebClientInfo

        public WebClientInfo​(RequestCycle requestCycle,
                             ClientProperties properties)
        Construct.
        Parameters:
        requestCycle - the request cycle
      • WebClientInfo

        public WebClientInfo​(RequestCycle requestCycle,
                             java.lang.String userAgent)
        Construct.
        Parameters:
        requestCycle - the request cycle
        userAgent - The User-Agent string
      • WebClientInfo

        public WebClientInfo​(RequestCycle requestCycle,
                             java.lang.String userAgent,
                             ClientProperties properties)
        Construct.
        Parameters:
        requestCycle - the request cycle
        userAgent - The User-Agent string
        properties - properties of client
    • Method Detail

      • getProperties

        public final ClientProperties getProperties()
        Gets the client properties object.
        Returns:
        the client properties object
      • getUserAgent

        public final java.lang.String getUserAgent()
        returns the user agent string.
        Returns:
        the user agent string
      • getRemoteAddr

        protected java.lang.String getRemoteAddr​(RequestCycle requestCycle)
        When using ProxyPass, requestCycle().getHttpServletRequest(). getRemoteAddr() returns the IP of the machine forwarding the request. In order to maintain the clients ip address, the server places it in the X-Forwarded-For Header. Proxies may also mask the original client IP with tokens like "hidden" or "unknown". If so, the last proxy ip address is returned.
        Parameters:
        requestCycle - the request cycle
        Returns:
        remoteAddr IP address of the client, using the X-Forwarded-For header and defaulting to: getHttpServletRequest().getRemoteAddr()