public class AdXAdapter extends Object implements ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
Copyright © Enremmeta LLC 2015. All Rights Reserved.
ExchangeAdapter.BidChoiceAlgorithm
Modifier and Type | Field and Description |
---|---|
static String |
ADX_SPECIFIC_INSTRUCTION_VENDOR_TYPE |
private AdXConfig |
config |
private static Map<Integer,AdxGeo> |
geo |
private com.google.doubleclick.crypto.DoubleClickCrypto.Keys |
keys |
static String |
RESPONSE_MEDIA_TYPE |
private long |
timeout |
Constructor and Description |
---|
AdXAdapter() |
AdXAdapter(boolean test)
The only one purpose of this constructors is to run test AdxTest
|
Modifier and Type | Method and Description |
---|---|
OpenRtbRequest |
convertRequest(com.google.protos.adx.NetworkBid.BidRequest req) |
com.google.protos.adx.NetworkBid.BidResponse |
convertResponse(OpenRtbRequest req,
OpenRtbResponse resp) |
String |
getClickEncMacro() |
String |
getClickMacro() |
long |
getDefaultTimeout()
What is the default timeout, in milliseconds (default, because timeout can also be provided
dynamically as
OpenRtbRequest.getTmax() on each request, which takes precedence). |
String |
getName() |
javax.ws.rs.core.Response.ResponseBuilder |
getOptoutBuilder(OpenRtbRequest req)
Default behavior is not OK here per
Build the
Response document.
|
String |
getPartnerInitiatedSyncUrl(String myUserId) |
String |
getResponseMediaType() |
String |
getSampleWinningPrice()
Return sample winning price suitable for decoding with
ExchangeAdapter.parse(String, long) |
static String |
getStringFromByteSting(com.google.protobuf.ByteString bs) |
String |
getWinningPriceMacro()
Winning price macro.
|
boolean |
localUserMapping()
Whether the mapping of
our user ID to exchange
ID is stored by us. |
Map<String,Object> |
makeExchangeSpecificInstructionsMap() |
ParsedPriceInfo |
parse(String winningPriceString,
long bidMicros) |
List<String> |
validateAd(Ad ad)
For calls from
Ad.validate() , for example. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkExchangeTargeting, debug, error, error, fillPlatformInfoFromUa, getBidChoiceAlgorithm, getSeat, getWinTimeout, info, isAggregator, isMacrosInNurl, isNurlRequired, massageBid, parseUserId, setHeaders, trace, trueWinOnNurlOrImpression
private final AdXConfig config
private final long timeout
private final com.google.doubleclick.crypto.DoubleClickCrypto.Keys keys
public static final String ADX_SPECIFIC_INSTRUCTION_VENDOR_TYPE
public static final String RESPONSE_MEDIA_TYPE
public AdXAdapter(boolean test) throws Lot49Exception
test
- Lot49Exception
public AdXAdapter() throws Lot49Exception
Lot49Exception
public long getDefaultTimeout()
ExchangeAdapter
OpenRtbRequest.getTmax()
on each request, which takes precedence).getDefaultTimeout
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public String getWinningPriceMacro()
ExchangeAdapter
getWinningPriceMacro
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
ExchangeAdapter.parse(String, long)
public boolean localUserMapping()
ExchangeAdapter
our user ID
to exchange
ID
is stored by us.localUserMapping
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public static final String getStringFromByteSting(com.google.protobuf.ByteString bs)
public String getPartnerInitiatedSyncUrl(String myUserId)
getPartnerInitiatedSyncUrl
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public OpenRtbRequest convertRequest(com.google.protos.adx.NetworkBid.BidRequest req)
convertRequest
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public javax.ws.rs.core.Response.ResponseBuilder getOptoutBuilder(OpenRtbRequest req)
getOptoutBuilder
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public Map<String,Object> makeExchangeSpecificInstructionsMap()
makeExchangeSpecificInstructionsMap
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public com.google.protos.adx.NetworkBid.BidResponse convertResponse(OpenRtbRequest req, OpenRtbResponse resp) throws Throwable
convertResponse
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
Throwable
public ParsedPriceInfo parse(String winningPriceString, long bidMicros) throws Throwable
parse
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
Throwable
DoubleClickCrypto
public String getName()
getName
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public String getClickMacro()
getClickMacro
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public String getClickEncMacro()
getClickEncMacro
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public String getResponseMediaType()
getResponseMediaType
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public List<String> validateAd(Ad ad)
ExchangeAdapter
Ad.validate()
, for example. Same semantics. Default implementation is
to return null.validateAd
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>
public String getSampleWinningPrice()
ExchangeAdapter
ExchangeAdapter.parse(String, long)
getSampleWinningPrice
in interface ExchangeAdapter<com.google.protos.adx.NetworkBid.BidRequest,com.google.protos.adx.NetworkBid.BidResponse>