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...


Cheers
Niclas

-- 
+---------//-------------------+
|   http://www.bali.ac         |
|  http://niclas.hedhman.org   |
+------//----------------------+

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

Reply via email to