Class POBRequestBuilder

  • All Implemented Interfaces:
    com.pubmatic.sdk.common.base.POBRequestBuilding

    
    public class POBRequestBuilder
     implements POBRequestBuilding
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      POBHttpRequest build() Method prepares the POBHttpRequest from the necessary member variables
      POBHttpRequest prepareHttpRequest(@NonNull() String serverUrl, @NonNull() String body, @Nullable() String ortbVersion) Prepare Ortb Http POST request, it also follows request timeout provided in POBRequest
      JSONObject getBody() Create ortb request body for ad
      JSONObject getAppJson(String publisherId) Used to get app json.
      void setDeviceInfo(@Nullable() POBDeviceInfo deviceInfo) The method takes value of POBDeviceInfo and set it to specific reference variable
      void setAppInfo(@Nullable() POBAppInfo appInfo) The method takes value of POBAppInfo and set it to specific reference variable
      void setLocationDetector(@Nullable() POBLocationDetector locationDetector) The method takes POBLocationDetector object and sets it to specific reference variable
      • Methods inherited from class java.lang.Object

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

      • build

         POBHttpRequest build()

        Method prepares the POBHttpRequest from the necessary member variables

        Returns:

        instance of POBHttpRequest

      • prepareHttpRequest

        @NonNull() POBHttpRequest prepareHttpRequest(@NonNull() String serverUrl, @NonNull() String body, @Nullable() String ortbVersion)

        Prepare Ortb Http POST request, it also follows request timeout provided in POBRequest

        Parameters:
        serverUrl - the server url for which request is going to perform
        body - the request body which is passed while making request
        ortbVersion - the ortb version, if not null passed to request headers
        Returns:

        instance of POBHttpRequest

      • getBody

         JSONObject getBody()

        Create ortb request body for ad

        Returns:

        the ortb string

      • getAppJson

         JSONObject getAppJson(String publisherId)

        Used to get app json. Builds oRTB app json by using app info, and user provided information It take publisher id as param to

        Parameters:
        publisherId - the publisher id for which user json is build.
        Returns:

        oRTB standard App json

      • setDeviceInfo

         void setDeviceInfo(@Nullable() POBDeviceInfo deviceInfo)

        The method takes value of POBDeviceInfo and set it to specific reference variable

        Parameters:
        deviceInfo - value POBDeviceInfo object
      • setAppInfo

         void setAppInfo(@Nullable() POBAppInfo appInfo)

        The method takes value of POBAppInfo and set it to specific reference variable

        Parameters:
        appInfo - value of type POBAppInfo
      • setLocationDetector

         void setLocationDetector(@Nullable() POBLocationDetector locationDetector)

        The method takes POBLocationDetector object and sets it to specific reference variable

        Parameters:
        locationDetector - value of LocationDetector object