[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: draft Java-api-12



Steven Sonntag wrote:
> 
> Rob Weltman wrote:
> 
> > Steven Sonntag wrote:
> > >
> > > > public void removeUnsolicitedNotificationListener( LDAPResponseListener listener )
> > > >
> > > >   I was thinking that you could have more than one listener - that's why the method naming (also, of course, to be consistent with the JDK's listener method naming). An implementation could feed each listener with a copy of each incoming unsolicited notification, and each client could pull out notifications independently.
> > > >
> > > > Rob
> > >
> > > Sounds good.
> > >
> > > Does there need to be a method on LDAPConnection that is something like
> > >
> > >     LDAPResponseListener[] getUnsolicitedNotificationListeners()
> > >
> > > to discover which listeners are allowed to receive unsolicited notifications on this connection?
> >
> >   That is not part of the standard listener pattern in the JDK, and I don't see any production use for it. Only the connection itself cares about what listeners are registered (except for if you are debugging the implementation; if you are debugging a client you can wrap the two methods in a derived class).
> >
> > Rob
> 
> I was thinking of an application needing to disable the receipt of Unsolicited notifications
> for a connection.

  That can be done by removing the listeners. I don't think it is a big deal for an application to keep track of its listener(s) if it wants to disable listening later on.

Rob