• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is delegation model  RSS feed

 
Ajay Bhargov
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anybody explain to me as to what is delegation model.I have come across this term "Delegation Model" in classes such as java.beans.PersistenceDelegate and java.beans.DefaultPersistenceDelegate.

And can anybody tell me as to what is the functionality of the above 2 classes. I have gone through their documentation, but i could get anything. So could anyone kindly post the explanation to my problem.

With Regards,
Ajay
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ajay Bhargov:
Hi,

Can anybody explain to me as to what is delegation model.I have come across this term "Delegation Model" in classes such as java.beans.PersistenceDelegate and java.beans.DefaultPersistenceDelegate.

And can anybody tell me as to what is the functionality of the above 2 classes. I have gone through their documentation, but i could get anything. So could anyone kindly post the explanation to my problem.


The explanation depends on the scenarios, where you use them... Delegation Model actually is to delegate something(events in AWT, clients requests in web applications)... They can be used in load balancing and stuff...

The main difference between those two is that java.beans.PersistenceDelegate is an abstract class and you can create a concrete class that extends java.beans.PersistenceDelegate, where you might put your own implementation of the methods in superclass. But java.beans.DefaultPersistenceDelegate is a default concrete class that extends java.beans.PersistenceDelegate. That basically is created by Sun for default implementation...

Hope my explanation helps....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!