Class FiftyOneJSServiceCore.Default

    • Constructor Detail

      • Default

        public Default​(ClientsidePropertyServiceCore clientsidePropertyServiceCore,
                       boolean enabled)
        Construct a new instance.
        Parameters:
        clientsidePropertyServiceCore - used to get the JavaScript to add to the returned file
        enabled - true if the service should be enabled
    • Method Detail

      • serveJS

        public boolean serveJS​(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
                        throws IOException
        Description copied from interface: FiftyOneJSServiceCore
        Check if the 51Degrees JavaScript is being requested and write it to the response if it is.
        Specified by:
        serveJS in interface FiftyOneJSServiceCore
        Parameters:
        request - the HttpServletRequest to get the FlowData from
        response - the HttpServletResponse to write the JavaScript to
        Returns:
        true if JavaScript was written to the response, false otherwise
        Throws:
        IOException - if there was a failure reading or writing to the request or response
      • serveJson

        public boolean serveJson​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws IOException
        Description copied from interface: FiftyOneJSServiceCore
        Check if the 51Degrees JSON is being requested and write it to the response if it is
        Specified by:
        serveJson in interface FiftyOneJSServiceCore
        Parameters:
        request - the HttpServletRequest to get the FlowData from
        response - the HttpServletResponse to write the JSON to
        Returns:
        true if JSON was written to the response, false otherwise
        Throws:
        IOException - if there was a failure reading or writing to the request or response