Would it be better to use some type of action code instead?
For (a bad) example:
  public final static int BORROW=0;
  public final static int RETURN=1;
  public final static int CREATE=2;
...

Then the event could be fired by:
listenEvent(int action, Object o) and the implementor can use a switch to implement the correct action and not worry about implementing every method.


This way, it is easier to maintain backwards compatibility in case of new listen events being introduced.

-Tim


Quinton McCombs wrote:
I am working on a patch to allow listeners to be added to pools that
will receive notifications on various events.  Does anyone object to
having this functionality included?

Here is the design -

I was thinking about adding support for a PoolListener interface for the
pool component. Object which implement this interface could be added to
any ObjectPool or KeyedObjectPool.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to