org.dvb.application
Class AppsDatabaseEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.dvb.application.AppsDatabaseEvent
All Implemented Interfaces:
java.io.Serializable

public class AppsDatabaseEvent
extends java.util.EventObject

The AppsDatabaseEvent class indicates either an entry in the application database has changed, or so many changes have occurred. that the database should be considered totally new. An event with event_id NEW_DATABASE shall always be sent after switching to a new service. After such an event, the contents of the database (both the set of applications and their attributes) shall reflect the new database contents. All former contents of the database shall be discarded except for running externally authorised applications. It is platform dependant if and when a new database event is thrown while tuned to the same service except that a NEW_DATABASE event shall not be sent when only one application has changed within a service.

The APP_ADDED, APP_CHANGED and APP_DELETED events shall not be generated in response to the same database change as caused a NEW_DATABASE event to be generated.

Since:
MHP1.0
See Also:
Serialized Form

Field Summary
static int APP_ADDED
          The addition event id.
static int APP_CHANGED
          The changed event id.
static int APP_DELETED
          The deletion event id.
static int NEW_DATABASE
          The new database event id.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AppsDatabaseEvent(int id, AppID appid, java.lang.Object source)
          Create a new AppsDatabaseEvent object for the entry in the database that changed, or for a new database.
 
Method Summary
 AppID getAppID()
          gets the application ID object for the entry in the database that changed.
 int getEventId()
          gets the type of the event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEW_DATABASE

public static final int NEW_DATABASE
The new database event id.

See Also:
Constant Field Values

APP_CHANGED

public static final int APP_CHANGED
The changed event id. The APP_CHANGED event is generated whenever any of the information about an application changes. It is NOT generated when the entry is added to or removed from the AppsDatabase. In such cases, the APP_ADDED or APP_DELETED events will be generated instead.

See Also:
Constant Field Values

APP_ADDED

public static final int APP_ADDED
The addition event id. The APP_ADDED event is generated whenever an entry is added to the AppsDatabase. It is NOT generated when the entry already in the AppsDatabase changes.

See Also:
Constant Field Values

APP_DELETED

public static final int APP_DELETED
The deletion event id. The APP_DELETED event is generated whenever an entry is removed from the AppsDatabase.

See Also:
Constant Field Values
Constructor Detail

AppsDatabaseEvent

public AppsDatabaseEvent(int id,
                         AppID appid,
                         java.lang.Object source)
Create a new AppsDatabaseEvent object for the entry in the database that changed, or for a new database.

Parameters:
id - the cause of the event
appid - the AppId of the entry that changed
source - the AppaDatabase object.
Since:
MHP1.0
Method Detail

getAppID

public AppID getAppID()
gets the application ID object for the entry in the database that changed.

When the event type is NEW_DATABASE, AppID will be null.

Returns:
application ID representing the application
Since:
MHP1.0

getEventId

public int getEventId()
gets the type of the event.

Returns:
an integer that matches one of the static fields describing events.
Since:
MHP1.0