com.ooyala.android.OoyalaNotification Class Reference

An object that is passed from the OoyalaPlayer to the all Observers that contains notification name and data. More...

Public Member Functions

 OoyalaNotification (String notificationName)
 Instantiate an OoyalaNotification with just a name, and no data. More...
 
 OoyalaNotification (String notificationName, Object data)
 Instantiate an OoyalaNotification with a name and associated data. More...
 
String getName ()
 Get the name of the notification. More...
 
Object getData ()
 Get the data that is provided within this notification. More...
 
String toString ()
 

Static Public Member Functions

static final String getNameOrUnknown (Object arg)
 Help parse the Object event types. More...
 

Static Public Attributes

static final String UNKNOWN_NOTIFICATION_NAME = "UNKNOWN"
 
static final String OLD_STATE_KEY = "oldState"
 
static final String NEW_STATE_KEY = "newState"
 

Detailed Description

An object that is passed from the OoyalaPlayer to the all Observers that contains notification name and data.

This class helps provide contextual information in Observer updates.

Constructor & Destructor Documentation

com.ooyala.android.OoyalaNotification.OoyalaNotification ( String  notificationName)

Instantiate an OoyalaNotification with just a name, and no data.

Parameters
notificationNamenon-null string, one of the OoyalaPlayer.*_NOTIFICATION_NAMEs.
com.ooyala.android.OoyalaNotification.OoyalaNotification ( String  notificationName,
Object  data 
)

Instantiate an OoyalaNotification with a name and associated data.

Parameters
notificationNamenon-null string, one of the OoyalaPlayer.*_NOTIFICATION_NAMEs.
datapossibly null notification-specific data.

Member Function Documentation

Object com.ooyala.android.OoyalaNotification.getData ( )

Get the data that is provided within this notification.

Returns
possibly null data originally passed in to the constructor.
String com.ooyala.android.OoyalaNotification.getName ( )

Get the name of the notification.

Returns
the 'notificationName' originally passed in to the constructor.
See also
OoyalaNotification(String)
OoyalaNotification(String, Object)
static final String com.ooyala.android.OoyalaNotification.getNameOrUnknown ( Object  arg)
static

Help parse the Object event types.

See also
java.util.Observer::update(Observable, Object)
Parameters
argthe second argument passed to the update method.
Returns
"UNKNOWN" if arg is not an instance of OoyalaNotification, otherwise the name of the notification.
String com.ooyala.android.OoyalaNotification.toString ( )

Member Data Documentation

final String com.ooyala.android.OoyalaNotification.NEW_STATE_KEY = "newState"
static
final String com.ooyala.android.OoyalaNotification.OLD_STATE_KEY = "oldState"
static
final String com.ooyala.android.OoyalaNotification.UNKNOWN_NOTIFICATION_NAME = "UNKNOWN"
static