RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Classes | Public Member Functions | Static Public Member Functions
RTBKIT::RubiconExchangeConnector Struct Reference

#include <rubicon_exchange_connector.h>

Inheritance diagram for RTBKIT::RubiconExchangeConnector:
RTBKIT::HttpExchangeConnector RTBKIT::ExchangeConnector Datacratic::HttpEndpoint Datacratic::ServiceBase Datacratic::PassiveEndpointT< SocketTransport > Datacratic::EventRecorder Datacratic::PassiveEndpoint Datacratic::EndpointBase Datacratic::Epoller Datacratic::AsyncEventSource TestRubiconExchangeConnector

List of all members.

Classes

struct  CampaignInfo
struct  CreativeInfo

Public Member Functions

 RubiconExchangeConnector (const std::string &name, std::shared_ptr< ServiceProxies > proxies)
virtual std::string exchangeName () const
virtual std::shared_ptr
< BidRequest
parseBidRequest (HttpAuctionHandler &connection, const HttpHeader &header, const std::string &payload)
virtual double getTimeAvailableMs (HttpAuctionHandler &connection, const HttpHeader &header, const std::string &payload)
virtual HttpResponse getResponse (const HttpAuctionHandler &connection, const HttpHeader &requestHeader, const Auction &auction) const
virtual HttpResponse getDroppedAuctionResponse (const HttpAuctionHandler &connection, const Auction &auction, const std::string &reason) const
virtual HttpResponse getErrorResponse (const HttpAuctionHandler &connection, const Auction &auction, const std::string &errorMessage) const
virtual ExchangeCompatibility getCampaignCompatibility (const AgentConfig &config, bool includeReasons) const
virtual ExchangeCompatibility getCreativeCompatibility (const Creative &creative, bool includeReasons) const

Static Public Member Functions

static float decodeWinPrice (const std::string &sharedSecret, const std::string &winPriceStr)

Detailed Description

Exchange connector for Rubicon. This speaks their flavour of the OpenRTB 2.1 protocol.

Configuration options are the same as the HttpExchangeConnector on which it is based.

Definition at line 25 of file rubicon_exchange_connector.h.


Member Function Documentation

virtual std::string RTBKIT::RubiconExchangeConnector::exchangeName ( ) const [inline, virtual]

Return the name of the exchange, as it would be written as an identifier.

Implements RTBKIT::HttpExchangeConnector.

Definition at line 30 of file rubicon_exchange_connector.h.

Given an agent configuration, return a structure that describes the compatibility of each campaign and creative with the exchange.

If includeReasons is true, then the reasons structure should be filled in with a list of reasons for which the exchange rejected the creative or campaign. If includeReasons is false, the reasons should be all empty to save memory allocations. Note that it doesn't make much sense to have the reasons non-empty for creatives or campaigns that are approved.

The default implementation assumes that all campaigns and creatives are compatible with the exchange.

Reimplemented from RTBKIT::HttpExchangeConnector.

Definition at line 259 of file rubicon_exchange_connector.cc.

Tell if a given creative is compatible with the given exchange. See getCampaignCompatibility().

Reimplemented from RTBKIT::HttpExchangeConnector.

Definition at line 322 of file rubicon_exchange_connector.cc.

HttpResponse RTBKIT::RubiconExchangeConnector::getDroppedAuctionResponse ( const HttpAuctionHandler connection,
const Auction auction,
const std::string &  reason 
) const [virtual]

Return a stringified JSON of the response for when we drop an auction.

Reimplemented from RTBKIT::HttpExchangeConnector.

Definition at line 239 of file rubicon_exchange_connector.cc.

HttpResponse RTBKIT::RubiconExchangeConnector::getErrorResponse ( const HttpAuctionHandler connection,
const Auction auction,
const std::string &  errorMessage 
) const [virtual]

Return a stringified JSON of the response for our auction. Default implementation calls getResponse() and stringifies the result.

This version is provided as it may be more efficient in terms of memory allocations.

The first element returned is the HTTP body, the second is the content type.

Reimplemented from RTBKIT::HttpExchangeConnector.

Definition at line 248 of file rubicon_exchange_connector.cc.

HttpResponse RTBKIT::RubiconExchangeConnector::getResponse ( const HttpAuctionHandler connection,
const HttpHeader requestHeader,
const Auction auction 
) const [virtual]

Return the HTTP response for our auction. Default implementation calls getResponse() and stringifies the result.

This version is provided as it may be more efficient in terms of memory allocations.

The first element returned is the HTTP body, the second is the content type.

Reimplemented from RTBKIT::HttpExchangeConnector.

Definition at line 152 of file rubicon_exchange_connector.cc.

double RTBKIT::RubiconExchangeConnector::getTimeAvailableMs ( HttpAuctionHandler connection,
const HttpHeader header,
const std::string &  payload 
) [virtual]

Return the available time for the bid request in milliseconds. This method should not parse the bid request, as when shedding load we want to do as little work as possible.

Most exchanges include this information in the HTTP headers.

Reimplemented from RTBKIT::HttpExchangeConnector.

Definition at line 135 of file rubicon_exchange_connector.cc.

std::shared_ptr< BidRequest > RTBKIT::RubiconExchangeConnector::parseBidRequest ( HttpAuctionHandler connection,
const HttpHeader header,
const std::string &  payload 
) [virtual]

Parse the given payload into a bid request.

Reimplemented from RTBKIT::HttpExchangeConnector.

Definition at line 96 of file rubicon_exchange_connector.cc.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator