Class POBRequest

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

    
    public class POBRequest
     implements POBAdRequest
                        

    Class to represent the OpenWrap ad request.

    • Constructor Detail

    • Method Detail

      • getProfileId

         int getProfileId()

        Returns the profile Id.

        Returns:

        profile Id

      • setVersionId

        @Deprecated() void setVersionId(@Nullable() Integer versionId)

        This is an optional OpenWrap version Id of the publisher. If this is not specified, live version of the above profile is considered.

        Parameters:
        versionId - OpenWrap version Id
      • getPlacementType

        @NonNull() POBAdFormat getPlacementType()

        Returns the OpenWrap ad format type

        Returns:

        OpenWrap ad format type

      • setAdServerUrl

         void setAdServerUrl(@Nullable() String adServerUrl)

        Setter method to set Ad Server Url Custom server URL for debugging purpose.

        Parameters:
        adServerUrl - string Url
      • createInstance

        @Nullable() static POBRequest createInstance(@NonNull() String pubId, int profileId, @NonNull() POBAdFormat placementType, @NonNull() Array<POBImpression> impressions)

        Returns the object of the POBRequest with provided parameters. Returns null if any of the impression objects or publisher id is not valid

        Parameters:
        pubId - Identifier of the publisher
        profileId - Profile ID of an ad tag
        impressions - Objects of POBImpression, separated by comma in case of multiple values.
        Returns:

        Instance of the POBRequest

      • isDebugStateEnabled

         boolean isDebugStateEnabled()

        Returns the debug state. False means no debug information will be available in bid response.

        Returns:

        debug state

      • enableDebugState

         void enableDebugState(boolean state)

        Enable/Disable debug information in the response. By default, debug is disabled and no debug information will be available in bid response.

        Parameters:
        state - debug state
      • getNetworkTimeout

         int getNetworkTimeout()

        Returns the network timeout (in seconds) for making an Ad request.

        Returns:

        network timeout (in seconds).

      • setNetworkTimeout

         void setNetworkTimeout(int networkTimeoutInSec)

        Sets the network timeout (in seconds) for making an Ad request. Default value is 5 seconds. Provided value should be greater than 0.

        Parameters:
        networkTimeoutInSec - value in seconds
      • getAdUnitId

        @NonNull() String getAdUnitId()

        Returns the Ad unit ID from the 0th index of impression array. In case Ad unit ID is not available then returns empty string.

        Returns:

        Ad unit ID from the 0th index of impression array

      • enableReturnAllBidStatus

         void enableReturnAllBidStatus(boolean state)

        Set to true if seatnonbids in response should be enabled. By default it is set to false To check the seatnonbids set the log level to Debug by following Enable SDK Logs. After response is received check for Received Seat Non Bids: in the logs for the seatnonbids json array received. The json array contains the statusCode with the rejection of the bid for each partner.

        Parameters:
        state - true if seatnonbid in response is expected
      • enableTestMode

         void enableTestMode(boolean testMode)

        Setter method to set Test mode of the request By default set to false When set to true, PubMatic may deliver only test ads which are not billable. Please disable the Test Mode for requests before you submit your application to the play store.

        Parameters:
        testMode - boolean value, either true or false