RecordStores support a JavaBeans-style listener mechanism. Interested objects can listen for changes to a record store by registering themselves as listeners.
The listener interface is javax.microedition.rms.RecordListener. You can manage a RecordStore's listeners with the following two methods:
public void addRecordListener(RecordListener listener) public void removeRecordListener(RecordListener listener)
The RecordListener interface has three methods: recordAdded(), recordChanged(), and recordDeleted(). These are called whenever a record is added, changed, or deleted. Each method is passed the RecordStore involved and the ID of the record in question.
Team-Fly |