Inheritance diagram for com.ooyala.android.item.OoyalaManagedAdSpot:
com.ooyala.android.item.AdSpot Comparable com.ooyala.android.ads.ooyala.OoyalaAdSpot com.ooyala.android.ads.vast.VASTAdSpot com.ooyala.android.ads.vast.VMAPAdSpot

Public Member Functions

int getTime ()
 Fetch the time at which this AdSpot should play. More...
 
URL getClickURL ()
 Fetch the URL to ping when this AdSpot is clicked. More...
 
List< URL > getTrackingURLs ()
 Fetch the list of tracking URLs to ping when this AdSpot is played. More...
 
int getPriority ()
 
void setPriority (int priority)
 set the priority of the ad spot. More...
 
abstract boolean fetchPlaybackInfo (OoyalaAPIClient api, PlayerInfo info)
 
int compareTo (AdSpot ad)
 compare two ad spots based on time, which is required to properly sort ad spots. More...
 
boolean needsPauseContent ()
 

Static Public Member Functions

static OoyalaManagedAdSpot create (JSONObject data, int contentDuration)
 

Protected Member Functions

 OoyalaManagedAdSpot ()
 
 OoyalaManagedAdSpot (int time, URL clickURL, List< URL > trackingURLs)
 
 OoyalaManagedAdSpot (JSONObject data)
 
ReturnState update (JSONObject data)
 

Protected Attributes

int _time = -1
 
int _priority = 0
 
URL _clickURL = null
 
List< URL > _trackingURLs = null
 

Static Protected Attributes

static final String KEY_TYPE = "type"
 
static final String KEY_TIME = "time"
 
static final String KEY_CLICK_URL = "click_url"
 
static final String KEY_TRACKING_URL = "tracking_url"
 
static final String AD_TYPE_OOYALA = "ooyala"
 
static final String AD_TYPE_VAST = "vast"
 

Constructor & Destructor Documentation

com.ooyala.android.item.OoyalaManagedAdSpot.OoyalaManagedAdSpot ( )
protected
com.ooyala.android.item.OoyalaManagedAdSpot.OoyalaManagedAdSpot ( int  time,
URL  clickURL,
List< URL >  trackingURLs 
)
protected
com.ooyala.android.item.OoyalaManagedAdSpot.OoyalaManagedAdSpot ( JSONObject  data)
protected

Member Function Documentation

int com.ooyala.android.item.AdSpot.compareTo ( AdSpot  ad)
inherited

compare two ad spots based on time, which is required to properly sort ad spots.

Parameters
adthe ad to be compared
static OoyalaManagedAdSpot com.ooyala.android.item.OoyalaManagedAdSpot.create ( JSONObject  data,
int  contentDuration 
)
static
abstract boolean com.ooyala.android.item.OoyalaManagedAdSpot.fetchPlaybackInfo ( OoyalaAPIClient  api,
PlayerInfo  info 
)
abstract
URL com.ooyala.android.item.OoyalaManagedAdSpot.getClickURL ( )

Fetch the URL to ping when this AdSpot is clicked.

Returns
the click URL
int com.ooyala.android.item.OoyalaManagedAdSpot.getPriority ( )
int com.ooyala.android.item.OoyalaManagedAdSpot.getTime ( )

Fetch the time at which this AdSpot should play.

Returns
The time at which this AdSpot should play in milliseconds.
List<URL> com.ooyala.android.item.OoyalaManagedAdSpot.getTrackingURLs ( )

Fetch the list of tracking URLs to ping when this AdSpot is played.

Returns
the priority
boolean com.ooyala.android.item.AdSpot.needsPauseContent ( )
inherited
Returns
if the ad spot needs to pause content and play an ad stream return true if content needs to be paused, e.g. VAST Linear ads false if content does not need to be paused, e.g. VAST Nonlinear ads
void com.ooyala.android.item.OoyalaManagedAdSpot.setPriority ( int  priority)

set the priority of the ad spot.

if two adspot have the same time, the one with higher priority(smaller value) will be played first.

ReturnState com.ooyala.android.item.OoyalaManagedAdSpot.update ( JSONObject  data)
protected

Member Data Documentation

URL com.ooyala.android.item.OoyalaManagedAdSpot._clickURL = null
protected
int com.ooyala.android.item.OoyalaManagedAdSpot._priority = 0
protected
int com.ooyala.android.item.OoyalaManagedAdSpot._time = -1
protected
List<URL> com.ooyala.android.item.OoyalaManagedAdSpot._trackingURLs = null
protected
final String com.ooyala.android.item.OoyalaManagedAdSpot.AD_TYPE_OOYALA = "ooyala"
staticprotected
final String com.ooyala.android.item.OoyalaManagedAdSpot.AD_TYPE_VAST = "vast"
staticprotected
final String com.ooyala.android.item.OoyalaManagedAdSpot.KEY_CLICK_URL = "click_url"
staticprotected
final String com.ooyala.android.item.OoyalaManagedAdSpot.KEY_TIME = "time"
staticprotected
final String com.ooyala.android.item.OoyalaManagedAdSpot.KEY_TRACKING_URL = "tracking_url"
staticprotected
final String com.ooyala.android.item.OoyalaManagedAdSpot.KEY_TYPE = "type"
staticprotected