dcsimg
How to design event object and event listener library in JavaBean framework?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Wenbiao_Han
Posted On:   Tuesday, April 3, 2001 02:04 PM

Hi, I am considering to build a event library under JavaBeans framework. As I understand, each event state object needs a corresponding listener interface, which will be implemented by the actual listener class. In that case, I have to create 30 different event listener interfaces for 30 different types of event objects. The problem is an actual listener has to implement each event listener interface in order to receive that event. So, the code may look like public class TestEventListener implements FirstEventListener, SecondEventListener, ThirdEventListener, ..., TwentithEventListener { /*implementation to all the methods in the listener interface*/ } Is this the only    More>>

Hi,

I am considering to build a event library under JavaBeans framework. As I understand, each event state object needs a corresponding listener interface, which will be implemented by the actual listener class. In that case, I have to create 30 different event listener interfaces for 30 different types of event objects. The problem is an actual listener has to implement each event listener interface in order to receive that event. So, the code may look like

public class TestEventListener implements
FirstEventListener, SecondEventListener, ThirdEventListener,
...,
TwentithEventListener
{

/*implementation to all the methods in the listener interface*/

}

Is this the only way or good way? Could anyone give some comments?

Many thanks in advance,

Wenbiao

   <<Less
About | Sitemap | Contact