Class HttpServletNetworkRequestEvent

    • Constructor Detail

      • HttpServletNetworkRequestEvent

        public HttpServletNetworkRequestEvent​(java.lang.String origin,
                                              int srcPort,
                                              int dstPort,
                                              java.lang.String srcIP,
                                              java.lang.String dstIP)
    • Method Detail

      • withDate

        public HttpServletNetworkRequestEvent withDate​(java.lang.String date)
        Common HTTP Metadata: Store the date into the header map
        Parameters:
        date - the date value
        Returns:
        "This" for method chaining.
      • withHost

        public HttpServletNetworkRequestEvent withHost​(java.lang.String host)
        Common HTTP Metadata: Store the host into the header map
        Parameters:
        host - the host value
        Returns:
        "This" for method chaining.
      • withHTTPOrigin

        public HttpServletNetworkRequestEvent withHTTPOrigin​(java.lang.String origin)
        Common HTTP Metadata: Store the origin into the header map
        Parameters:
        origin - the Origin value
        Returns:
        "This" for method chaining.
      • withReferer

        public HttpServletNetworkRequestEvent withReferer​(java.lang.String referer)
        Common HTTP Metadata: Store the referer into the header map
        Parameters:
        referer - the referer value
        Returns:
        "This" for method chaining.
      • withUserAgent

        public HttpServletNetworkRequestEvent withUserAgent​(java.lang.String userAgent)
        Common HTTP Metadata: Store the user-agent into the header map
        Parameters:
        userAgent - the user-agent value
        Returns:
        "This" for method chaining.
      • withHeaderMap

        public HttpServletNetworkRequestEvent withHeaderMap​(java.util.Map<java.lang.String,​java.lang.String> inputMap)
        Populate the contents of the inputMap into the header map.
        Overrides:
        withHeaderMap in class AbstractProtocolEvent
        Parameters:
        inputMap - the input map to add onto the header map.
        Returns:
        the 'this' for method chaining
      • withMethod

        public HttpServletNetworkRequestEvent withMethod​(java.lang.String method)
        Store the HTTP method/verb into this event
        Parameters:
        method - The HTTP method/verb. Can be "POST", "GET", "PUT", etc
        Returns:
        "This" for method chaining.
      • withURL

        public HttpServletNetworkRequestEvent withURL​(java.lang.String url)
        Store the HTTP URL from the incoming request into this event.
        Parameters:
        url - the URL from the request.
        Returns:
        "This" for method chaining.
      • getHeaderData

        public java.lang.String getHeaderData​(java.lang.String key)
        Get the value of header information tied to this event.
        Specified by:
        getHeaderData in interface ProtocolEvent
        Overrides:
        getHeaderData in class AbstractProtocolEvent
        Parameters:
        key - the name of the header
        Returns:
        the header value associated with the key.
      • getDate

        public java.lang.String getDate()
        Common HTTP metadata: return the date entry from the header.
        Specified by:
        getDate in interface HttpNetworkProtocolRequestEvent
        Returns:
        The date value
      • getHost

        public java.lang.String getHost()
        Common HTTP metadata: return the host entry from the header.
        Specified by:
        getHost in interface HttpNetworkProtocolRequestEvent
        Returns:
        The host value
      • getHTTPOrigin

        public java.lang.String getHTTPOrigin()
        Common HTTP metadata: return the origin entry from the header.
        Specified by:
        getHTTPOrigin in interface HttpNetworkProtocolRequestEvent
        Returns:
        The origin value
      • getReferer

        public java.lang.String getReferer()
        Common HTTP metadata: return the referer entry from the header. (Please note the word "referer" vs "referrer")
        Specified by:
        getReferer in interface HttpNetworkProtocolRequestEvent
        Returns:
        The referer value
      • getUserAgent

        public java.lang.String getUserAgent()
        Common HTTP metadata: return the user-agent entry from the header.
        Specified by:
        getUserAgent in interface HttpNetworkProtocolRequestEvent
        Returns:
        The user-agent value
      • getMethod

        public java.lang.String getMethod()
        Get the http verb/method used from the incoming request.
        Specified by:
        getMethod in interface HttpNetworkProtocolRequestEvent
        Returns:
        The method value (POST, GET, PUT, etc)
      • getURL

        public java.lang.String getURL()
        Get the URL associated with the incoming request
        Specified by:
        getURL in interface HttpNetworkProtocolRequestEvent
        Returns:
        The incoming URL request
      • getLocalIPAddress

        public java.lang.String getLocalIPAddress()
        Retrieve the IP address of the interface on which the request was received.
        Specified by:
        getLocalIPAddress in interface HttpNetworkProtocolRequestEvent
        Returns:
        The local IP address