public class OpenXAdapter extends ExchangeAdapterImpl<OpenRtbRequest,OpenRtbResponse>
ExchangeAdapter.BidChoiceAlgorithm
Modifier and Type | Field and Description |
---|---|
private OpenXConfig |
config |
private static SsRtbCrypter |
OPENX_CRYPTER |
static String |
RESPONSE_MEDIA_TYPE |
Constructor and Description |
---|
OpenXAdapter() |
Modifier and Type | Method and Description |
---|---|
String |
checkExchangeTargeting(OpenRtbRequest req,
Impression imp,
ExchangeTargeting targeting)
Check any exchange-specific targeting.
|
OpenRtbRequest |
convertRequest(OpenRtbRequest req) |
OpenRtbResponse |
convertResponse(OpenRtbRequest req,
OpenRtbResponse o) |
ExchangeAdapter.BidChoiceAlgorithm |
getBidChoiceAlgorithm()
We put RANDOM here but only because we don't want the default "ALL" - so that we properly key
the BidInFlightInfo object.
|
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). |
private SecretKeySpec |
getKeySpec(String keyStr) |
String |
getName() |
String |
getResponseMediaType() |
String |
getSampleWinningPrice()
Return sample winning price suitable for decoding with
ExchangeAdapter.parse(String, long) |
String |
getWinningPriceMacro()
Winning price macro.
|
long |
getWinTimeout()
How long, in seconds, to wait, before declaring a loss.
|
boolean |
localUserMapping()
Whether the mapping of
our user ID to exchange
ID is stored by us. |
Bid |
massageBid(OpenRtbRequest req,
Impression imp,
Tag tag,
Bid bid)
Post-process a bid.
|
ParsedPriceInfo |
parse(String winningPriceString,
long bidMicros) |
boolean |
trueWinOnNurlOrImpression()
Whether the true win is known by the
winning price , gotten
either during the call of NUrl or out of band. |
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
debug, error, error, fillPlatformInfoFromUa, getOptoutBuilder, getPartnerInitiatedSyncUrl, getSeat, info, isAggregator, isMacrosInNurl, isNurlRequired, makeExchangeSpecificInstructionsMap, parseUserId, setHeaders, trace, validateAd
private static final SsRtbCrypter OPENX_CRYPTER
private final OpenXConfig config
public static final String RESPONSE_MEDIA_TYPE
public OpenXAdapter() throws Lot49Exception
Lot49Exception
public long getWinTimeout()
ExchangeAdapter
public ExchangeAdapter.BidChoiceAlgorithm getBidChoiceAlgorithm()
public final long getDefaultTimeout()
ExchangeAdapter
OpenRtbRequest.getTmax()
on each request, which takes precedence).public final String getSampleWinningPrice()
ExchangeAdapter
ExchangeAdapter.parse(String, long)
public final String getWinningPriceMacro()
ExchangeAdapter
ExchangeAdapter.parse(String, long)
public final boolean localUserMapping()
ExchangeAdapter
our user ID
to exchange
ID
is stored by us.public final OpenRtbRequest convertRequest(OpenRtbRequest req) throws Throwable
Throwable
public String getName()
public OpenRtbResponse convertResponse(OpenRtbRequest req, OpenRtbResponse o) throws Exception
Exception
public ParsedPriceInfo parse(String winningPriceString, long bidMicros) throws Throwable
Throwable
ExchangeAdapter.getWinningPriceMacro()
private final SecretKeySpec getKeySpec(String keyStr) throws UnsupportedEncodingException, org.apache.commons.codec.DecoderException
UnsupportedEncodingException
org.apache.commons.codec.DecoderException
public String getClickMacro()
public String getClickEncMacro()
public boolean trueWinOnNurlOrImpression()
ExchangeAdapter
winning price
, gotten
either during the call of NUrl or out of band. For example, OpenX
does the latter, and so a true Win should be registered in
StatsSvc.resultsOpenX(javax.ws.rs.core.UriInfo, String, com.enremmeta.rtb.proto.openx.AuctionResultMessage, String, javax.servlet.http.HttpServletRequest, String, javax.ws.rs.core.HttpHeaders)
StatsSvc#nurl(javax.ws.rs.core.UriInfo, String, String, String, String, String, String,
String, String, String, String, long, String, String, String, String, String, String,
javax.servlet.http.HttpServletRequest, String, String, String, String, String)
,
LogUtils.logWin(String, String, String, String, String, String, String, double, long,
long, long, String, String, String, String, String,
javax.servlet.http.HttpServletRequest, String, Long, String, java.net.URI, boolean,
String, String, String, String, String, String, boolean, boolean, String)
,
StatsSvc.impression(javax.ws.rs.core.UriInfo, String, String, String, String, String,
String, String, String, String, long, String, int, String, String, String, String,
String, String, String, javax.servlet.http.HttpServletRequest, String,
javax.ws.rs.core.HttpHeaders, String, String)
public String checkExchangeTargeting(OpenRtbRequest req, Impression imp, ExchangeTargeting targeting)
ExchangeAdapter
ExchangeAdapter.checkExchangeTargeting(OpenRtbRequest, Impression, ExchangeTargeting)
MatchingAdId
public Bid massageBid(OpenRtbRequest req, Impression imp, Tag tag, Bid bid)
ExchangeAdapter
Tag.getBid(OpenRtbRequest, Impression)
public String getResponseMediaType()