Record Listeners

In contrast to the desktop file system, it is possible to register listeners to record stores. A listener is informed whenever a record is changed in the record store it is registered to. This mechanism may be useful if different threads or different MIDlets of the same MIDlet suite are operating on one record store in parallel. A possible application could be some kind of automated logging service, writing records in the background. A MIDlet providing a GUI for the service could register itself as listener to the log record store when it is running in the foreground. Thus, it would be able to update its display of the log entries whenever a new record is added.

The corresponding RecordListener interface consists of the following ...

Get Java™ 2 Micro Edition Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.