SIChangeEvent

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.tv.service
Class SIChangeEvent

    java.lang.Object
      java.util.EventObject
          javax.tv.service.SIChangeEvent

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  ProgramScheduleEvent, ServiceDetailsSIChangeEvent, TransportSIChangeEvent

    public abstract class SIChangeEvent

extends EventObject

`SIChangeEvent` objects are sent to `SIChangeListener` instances to signal detected changes in the SI database.

Note that while the SI database may detect changes, notification of which specific `SIElement` has changed is not guaranteed. The entity reported by the method `getSIElement()` will be either:

- The specific SI element that changed, or

- An SI element that contains, however indirectly, the specific SI element that changed, or

- `null`, if the specific changed element is unknown.

The level of specificity provided by the change mechanism is entirely dependent on the capabilities and current resources of the implementation. `SIChangeEvent` instances also report the kind of change that occurred to the SI element, via the method `getChangeType()`:

- An `SIChangeType` of `ADD` indicates that the reported SI element is new in the database.

- An `SIChangeType` of `REMOVE` indicates that the reported SI element is defunct and no longer cached by the database. The results of subsequent method invocations on the removed SIElement are undefined.

- An `SIChangeType` of `MODIFY` indicates that the data encapsulated by the reported SI element has changed.

In the event that the SIElement reported by this event is not the actual element that changed in the broadcast (i.e. it is instead a containing element or `null`), the `SIChangeType` will be `MODIFY`. Individual SI element changes are reported only once, i.e., a change to an SI element is not also reported as a change to any containing (or "parent") SI elements.

See Also:
  `getSIElement()`, `getChangeType()`, Serialized Form

Constructor Summary
`SIChangeEvent(Object source, SIChangeType type, SIElement e)` Constructs an `SIChangeEvent` object.

Method Summary
`SIChangeType` | `getChangeType()` Indicates the type of change that occurred.
`SIElement` | `getSIElement()` Reports the `SIElement` that changed.

Methods inherited from class java.util.EventObject
`getSource, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SIChangeEvent

    public SIChangeEvent(Object source,
                         SIChangeType type,
                         SIElement e)

  Constructs an `SIChangeEvent` object.

  Parameters:
    `source` - The entity in which the change occurred.
    `type` - The type of change that occurred.
    `e` - The `SIElement` that changed, or `null` if this is unknown.

Method Detail

### getSIElement

    public SIElement getSIElement()

  Reports the `SIElement` that changed.

  This method may return `null`, since it is not guaranteed that the SI database can or will determine which element in a particular table changed.

  Returns:
    The `SIElement` that changed, or `null` if this is unknown.

### getChangeType

    public SIChangeType getChangeType()

  Indicates the type of change that occurred.

  Returns:
    The type of change that occurred.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD