> -----Original Message-----
> From: Leo Simons [mailto:[EMAIL PROTECTED]] 
> Sent: den 11 juni 2002 18:05
> To: Avalon Developers List
> Subject: RE: [proposal] avalon 5 ComponentManager interface
> 
> 
> > > Same way as you deal with all resources. ie call close(),
> > > release() etc. 
> > 
> > So can I assume that every component, or every XXXXManager
> > has a close() or release() method?
> 
> I'd not suggest that...if you want to isolate the client from 
> determining whether the component has/needs the 
> close()/release(), use a utility.
> 
> >   "Every pair of component C and its associated CManager interfaces
> >    must define a method that, when called by the client, indicates 
> >    that the client is finished using the component C. The method 
> >    may be in the CManager interface - for example, 
> >    CManager.release (C c) - or in the C interface - for example, 
> >    C.close (). Note that this contract applies to component 
> > *interfaces*.
> >    even if the implementation does not require an end-of-transaction
> >    signal from the client, the method must be specified so 
> > implementations
> >    that do require such a signal can recieve them."
> > 
> > How about that?
> 
> make that:
> 
> A component must define a method with the following signature:
> 
> public void release();
> 
> or a component's manager (if it exists) must define a method 
> with the following signature:
> 
> public void release( Object );
> 
> at the interface level, that, when called by a client, 
> indicates that the client is finished using the component if 
> it has any resources that require releasing.

I we removed the "if it has any resources that require releasing."
I'd be with you.

> You can even write a ReleaseUtil 

I'd prefer all components to have one way of releasing them,
so you didn't have to check for specific implementation details
(requires release), but could just treat all components the same.

That is, 

   A component interface must define a method with the following 
   signature:
 
   public void release();
 
   or a component's manager (if it exists) must define a method 
   with the following signature:
 
   public void release( Object );

Period.

Much easier to code for. I'm also fine with the release() method 
being called close() in some components and endDocument() in some.
Just that there is one.

/LS


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

Reply via email to