public class BidSwitchAdapter extends ExchangeAdapterImpl<OpenRtbRequest,OpenRtbResponse>
Copyright © Enremmeta LLC 2015. All Rights Reserved.
ExchangeAdapter.BidChoiceAlgorithm| Modifier and Type | Field and Description | 
|---|---|
| private BidSwitchConfig | config | 
| static String | RESPONSE_MEDIA_TYPE | 
| private String | seatId | 
| Constructor and Description | 
|---|
| BidSwitchAdapter() | 
| BidSwitchAdapter(BidSwitchConfig bsConf) | 
| Modifier and Type | Method and Description | 
|---|---|
| OpenRtbRequest | convertRequest(OpenRtbRequest req) | 
| OpenRtbResponse | 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() | 
| String | getPartnerInitiatedSyncUrl(String myUserId) | 
| String | getResponseMediaType() | 
| String | getSampleWinningPrice()Return sample winning price suitable for decoding with  ExchangeAdapter.parse(String, long) | 
| String | getSeat(Ad ad) | 
| String | getWinningPriceMacro()Winning price macro. | 
| boolean | isAggregator() | 
| boolean | isMacrosInNurl() | 
| boolean | isNurlRequired()Whether  NUrl is required(two-step response). | 
| boolean | localUserMapping()Whether the mapping of  our user IDtoexchange
 IDis stored by us. | 
| 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. | 
toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckExchangeTargeting, debug, error, error, fillPlatformInfoFromUa, getBidChoiceAlgorithm, getOptoutBuilder, getWinTimeout, info, makeExchangeSpecificInstructionsMap, massageBid, parseUserId, setHeaders, trace, validateAdprivate final String seatId
private final BidSwitchConfig config
public static final String RESPONSE_MEDIA_TYPE
public BidSwitchAdapter(BidSwitchConfig bsConf)
public BidSwitchAdapter()
public String getSampleWinningPrice()
ExchangeAdapterExchangeAdapter.parse(String, long)public final boolean isAggregator()
public final long getDefaultTimeout()
ExchangeAdapterOpenRtbRequest.getTmax() on each request, which takes precedence).public final String getWinningPriceMacro()
ExchangeAdapterExchangeAdapter.parse(String, long)public final boolean localUserMapping()
ExchangeAdapterour user ID to exchange
 ID is stored by us.public final OpenRtbRequest convertRequest(OpenRtbRequest req) throws Throwable
Throwablepublic String getName()
public OpenRtbResponse convertResponse(OpenRtbRequest req, OpenRtbResponse resp) throws Exception
Exceptionpublic ParsedPriceInfo parse(String winningPriceString, long bidMicros) throws Throwable
ThrowableExchangeAdapter.getWinningPriceMacro()public boolean isNurlRequired()
ExchangeAdapterNUrl is required (two-step response). Since most exchanges for
 now accept single-step response (returning the entire markup at once, we
 default the implementation to false.public boolean isMacrosInNurl()
public String getClickMacro()
public String getClickEncMacro()
public boolean trueWinOnNurlOrImpression()
ExchangeAdapterwinning 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 getResponseMediaType()