avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: [patch] Add listeners for logger creation
Date Tue, 04 Feb 2003 07:22:06 GMT
> >   public synchronized void add<T>Listener(<T>Listener listener)
> >    throws java.util.TooManyListenersException;

> I think maybe the method instead should be set<T>Listener then so
> the contract is clear.

Please see: http://java.sun.com/products/javabeans/docs/beans.101.pdf
section 6.5.2.  The contract is clear and specified:

   public void add <ListenerType>( <ListenerType> listener)
     throws java.util.TooManyListenersException;

The reason for this is documented: "Note that the unicast pattern is a
special case of the multicast pattern and as such allows migration of a
unicast event source to a multicast event source, without breaking existing
client code."  Unicast methods are somewhat discouraged.

	--- Noel

To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

View raw message