Package com.pubmatic.sdk.openwrap.core
Class POBRequestBuilder
-
- All Implemented Interfaces:
-
com.pubmatic.sdk.common.base.POBRequestBuilding
public class POBRequestBuilder implements POBRequestBuilding
-
-
Constructor Summary
Constructors Constructor Description POBRequestBuilder(POBRequest request, String url, Context context)
-
Method Summary
Modifier and Type Method Description POBHttpRequestbuild()Method prepares the POBHttpRequest from the necessary member variables POBHttpRequestprepareHttpRequest(@NonNull() String serverUrl, @NonNull() String body, @Nullable() String ortbVersion)Prepare Ortb Http POST request, it also follows request timeout provided in POBRequest JSONObjectgetBody()Create ortb request body for ad JSONObjectgetAppJson(String publisherId)Used to get app json. voidsetDeviceInfo(@Nullable() POBDeviceInfo deviceInfo)The method takes value of POBDeviceInfo and set it to specific reference variable voidsetAppInfo(@Nullable() POBAppInfo appInfo)The method takes value of POBAppInfo and set it to specific reference variable voidsetLocationDetector(@Nullable() POBLocationDetector locationDetector)The method takes POBLocationDetector object and sets it to specific reference variable -
-
Constructor Detail
-
POBRequestBuilder
POBRequestBuilder(POBRequest request, String url, Context context)
-
-
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 performbody- the request body which is passed while making requestortbVersion- 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
-
-
-
-