@Test public void setContextTest() { RTBRequestWrapper requestWrapper = new RTBRequestWrapper(bidRequest); requestWrapper.setContext(exchanger, advertisers, requestTime, offerTime); assertNotNull("Exchanger should be provided",requestWrapper.exchange); assertNotNull("Advertiser should be provided",requestWrapper.advertisers); assertTrue("Organisation name not match",requestWrapper.exchange.getOrgName()=="LGExchange"); assertTrue("request time not match",requestWrapper.offerTimeoutMs==2000); assertTrue("request time not match",requestWrapper.requestTimeoutMs==2000); }
public void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers, long defaultRequestTO, long defaultOfferTO) { this.exchange = new RTBExchange(exchange); this.advertisers.clear(); this.advertisers.putAll(advertisers); if (this.request.tmax == null) { this.requestTimeoutMs = defaultRequestTO; } else { this.requestTimeoutMs = this.request.tmax.longValue(); } this.offerTimeoutMs = defaultOfferTO; this.isOfferTimerActive = false; }
RTBRequestWrapper extends BidRequest { public void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers, long defaultRequestTO, long defaultOfferTO) { this.exchange = new RTBExchange(exchange); this.advertisers.clear(); this.advertisers.putAll(advertisers); if (this.request.tmax == null) { this.requestTimeoutMs = defaultRequestTO; } else { this.requestTimeoutMs = this.request.tmax.longValue(); } this.offerTimeoutMs = defaultOfferTO; this.isOfferTimerActive = false; } }
RTBRequestWrapper extends BidRequest { public void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers, long defaultRequestTO, long defaultOfferTO) { this.exchange = new RTBExchange(exchange); this.advertisers.clear(); this.advertisers.putAll(advertisers); if (this.request.tmax == null) { this.requestTimeoutMs = defaultRequestTO; } else { this.requestTimeoutMs = this.request.tmax.longValue(); } this.offerTimeoutMs = defaultOfferTO; this.isOfferTimerActive = false; } RTBRequestWrapper();  RTBRequestWrapper(BidRequest request); }
RTBRequestWrapper extends BidRequest { public void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers, long defaultRequestTO, long defaultOfferTO) { this.exchange = new RTBExchange(exchange); this.advertisers.clear(); this.advertisers.putAll(advertisers); if (this.request.tmax == null) { this.requestTimeoutMs = defaultRequestTO; } else { this.requestTimeoutMs = this.request.tmax.longValue(); } this.offerTimeoutMs = defaultOfferTO; this.isOfferTimerActive = false; } RTBRequestWrapper();  RTBRequestWrapper(BidRequest request); void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers,
							long defaultRequestTO, long defaultOfferTO); BidRequest getRequest(); Map<String, String> getUnblockedSeats(String sspName); String getSSPName(); RTBAdvertiser getAdvertiser(String landingPage); void setRequestTO(long requestTO); long getRequestTO(); long getOfferTO(); void setOfferTimerActive(boolean trueOrFalse); boolean isOfferTimerActive(); }
RTBRequestWrapper extends BidRequest { public void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers, long defaultRequestTO, long defaultOfferTO) { this.exchange = new RTBExchange(exchange); this.advertisers.clear(); this.advertisers.putAll(advertisers); if (this.request.tmax == null) { this.requestTimeoutMs = defaultRequestTO; } else { this.requestTimeoutMs = this.request.tmax.longValue(); } this.offerTimeoutMs = defaultOfferTO; this.isOfferTimerActive = false; } RTBRequestWrapper();  RTBRequestWrapper(BidRequest request); void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers,
							long defaultRequestTO, long defaultOfferTO); BidRequest getRequest(); Map<String, String> getUnblockedSeats(String sspName); String getSSPName(); RTBAdvertiser getAdvertiser(String landingPage); void setRequestTO(long requestTO); long getRequestTO(); long getOfferTO(); void setOfferTimerActive(boolean trueOrFalse); boolean isOfferTimerActive();  }