Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Interface RecordListener

http://improvejava.blogspot.in
• javax.microedition.rms
• public interface RecordListener

http://improvejava.blogspot.in
• A listener interface for receiving Record
Changed/Added/Deleted events from a record
store.

http://improvejava.blogspot...
• If a record store is changed, then
RecordListener interface notifies its
implementation class about the changes made
to ...
http://improvejava.blogspot.in
Here I have added one new record which
record was not there in previous record store

http://improvejava.blogspot.in
• So this added information is notified to
implementation class.
Class Ex implements RecordListener
{
}
• Here RecordListe...
• There are 3 events are there
1. Record added: when this event occurs, the
recordAdded() method of RecordListener is
invo...
Where should we use?
• When a class want to notify of the changes in
record store, then it must implement the
three method...
Methods
Void recordAdded(RecordStore recordStore, int recordId)

• Called when a record has been added to a record store.
...
Upcoming SlideShare
Loading in …5
×

Record listener interface

376 views

Published on

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Record listener interface

  1. 1. Interface RecordListener http://improvejava.blogspot.in
  2. 2. • javax.microedition.rms • public interface RecordListener http://improvejava.blogspot.in
  3. 3. • A listener interface for receiving Record Changed/Added/Deleted events from a record store. http://improvejava.blogspot.in
  4. 4. • If a record store is changed, then RecordListener interface notifies its implementation class about the changes made to the recordstore. • For example I have a record store like follows http://improvejava.blogspot.in
  5. 5. http://improvejava.blogspot.in
  6. 6. Here I have added one new record which record was not there in previous record store http://improvejava.blogspot.in
  7. 7. • So this added information is notified to implementation class. Class Ex implements RecordListener { } • Here RecordListener informs the modification to class Ex http://improvejava.blogspot.in
  8. 8. • There are 3 events are there 1. Record added: when this event occurs, the recordAdded() method of RecordListener is involved. 2. RecordDeleted(): this event occurs when the RecordDeleted() method invoked 3. when we modify any record, then recordChanged() method will be executed • These methods are member of RecordListener http://improvejava.blogspot.in
  9. 9. Where should we use? • When a class want to notify of the changes in record store, then it must implement the three methods of RecordListener. • A record listener can be added following syntax: • Rec.addRecordListener(new Ex());//here rec is ref of recordstore, Ex is class to be notified http://improvejava.blogspot.in
  10. 10. Methods Void recordAdded(RecordStore recordStore, int recordId) • Called when a record has been added to a record store. Void recordChanged(RecordStore recordStore, int recordId) • Called after a record in a record store has been changed. Void recordDeleted(RecordStore recordStore, int recordId) Called after a record has been deleted from a record store. http://improvejava.blogspot.in

×