Class RuntimeEnvironment

    • Method Summary

      Modifier and Type Method Description
      java.lang.String getClientIpAddress()
      Get the IP address of the original request.
      java.lang.String getSdkVersion()  
      RuntimeEnvironment.Type getType()  
      java.lang.String getUserAgent()  
      boolean isDebug()  
      void setClientIpAddress​(java.lang.String clientIpAddress)  
      void setSdkVersion​(java.lang.String sdkVersion)
      Get the SDK version associated with this request.
      void setUserAgent​(java.lang.String userAgent)
      Get the user agent HTTP header that is sent by this runtime environment
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isDebug

        public boolean isDebug()
        Returns:
        true if application is running in the debug mode
      • getClientIpAddress

        public java.lang.String getClientIpAddress()
        Get the IP address of the original request. Requests to the mParticle API may come from a browser, and iOS/tvOS/Android device, or a server when data originates from a server-to-server integration.
        Returns:
        returns the IP address of the client request
      • setClientIpAddress

        public void setClientIpAddress​(java.lang.String clientIpAddress)
      • getSdkVersion

        public java.lang.String getSdkVersion()
      • setSdkVersion

        public void setSdkVersion​(java.lang.String sdkVersion)
        Get the SDK version associated with this request. mParticle customers can use a variety of SDKs to send data into the mParticle platform. The Android, iOS, and Javascript client SDKs will automatically include their SDK version with each request, which will be included in the respective outgoing Firehose request. Customers who use the mParticle server-to-server SDKs, or who send data to mParticle using their own HTTP clients may not include any SDK version.
        Parameters:
        sdkVersion - SDK version, ex: "6.12.1", may be null
      • getUserAgent

        public java.lang.String getUserAgent()
        Returns:
        the user agent HTTP header sent by this runtime environment
      • setUserAgent

        public void setUserAgent​(java.lang.String userAgent)
        Get the user agent HTTP header that is sent by this runtime environment
        Parameters:
        userAgent - value