| Author |
Object communication in java?
|
Ashish K Sharma
Ranch Hand
Joined: Aug 22, 2006
Posts: 31
|
|
Hi, I want to Notify an class A whenever something happenes to another class B, i mean any method called, any variable updated? How can i achieve this in java? Ashish
|
 |
Awais Bajwa
Ranch Hand
Joined: Jan 16, 2001
Posts: 190
|
|
Use a referece of Clas A to get notified in B. Read Observer Design Pattern. Awias Bajwa
|
 |
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
|
Can you change class B?
|
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12265
|
|
I want to Notify an class A whenever something happenes to another class B,
Keep in mind that you are really talking about an instance of class A and an instance of class B, NOT the Class object. Bill
|
Java Resources at www.wbrogden.com
|
 |
Ashish K Sharma
Ranch Hand
Joined: Aug 22, 2006
Posts: 31
|
|
Thanks for your inputs. Yes it's abour object instances for sure. I believe i need to gain more knowledge on design patterns first. Thanks again
|
 |
 |
|
|
subject: Object communication in java?
|
|
|