avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: Container supported interceptable service
Date Tue, 20 Apr 2004 01:58:00 GMT
Niclas Hedhman wrote:

> On Monday 19 April 2004 18:49, Albert Kwong wrote:
> 
>>I have drafted some ideas here.  What do you think?
> 
> 
> Ok, I have a better picture now, but one assumption still remain;
> 1. The InterceptorOne and InterceptorTwo are handled as components by the 
> container.
> 
> I kind-of like the whole notion, but still wonder if it is generic enough for 
> "most cases". Likewise I wonder if a "more generic" way is an overkill and 
> adds too much complexity.
> 
> Lets take small steps, and start with the simple pieces first. Here are my 
> reflections;
> 
> Your model requires the Service to declare what can be intercepted and the 
> Type of the Interception components.
> IMHO, it is more natural to do the opposite, declaring the Service(s) that the 
> Interceptor works upon.
> 
> public interface AbcService
> {
>     String doAbc ();
> 
>     String doDef ();
> }
> 
> /** @avalon.interceptor  type=AbcService
>  **/
> public interface AbcInterceptor
> {
>     String doAbc ();
> }
> 
> /** @avalon.interceptor  type=AbcService
>  **/
> public interface DefInterceptor
> {
>     String doDef();
> }
> 
> The advantage would be that you can create interception on any existing 
> component/service, without modification. Also, better separation of 
> Interception of different sorts, as many Interceptions can be done on the 
> same Service.
> The disadvantage would be that the Interceptor interface needs to be created 
> maually (IMO, a very small price.).
> 
> 
> If I halt here for a second, and let you and others comment, before moving on 
> to more details...


I'm thinking exactly the same thing.
But I'm still thinking (and its late - dangerous combination).

Steve.


-- 

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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


Mime
View raw message