avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: [Interceptors] Definition and basic use cases
Date Wed, 04 Sep 2002 23:02:32 GMT


Igor Fedorenko wrote:

>
>
> Nicola Ken Barozzi wrote:
>
>>
>> Igor Fedorenko wrote:
>>
>>>>> Possibly it could be per-application, per-component, per-service 
>>>>> or even per "client".
>>>>
>>>>
>>>>
>>> Is there a concept of a client in phoenix at the moment? I'd like 
>>> not to consider per-client interceptors, at least for now.
>>
>>
>> +1 ATM
>
> Excuse my ignorance, but what "ATM" stands for?
>
>>> Blocks must not know anything about their interceptors, so blocks do 
>>> not depend on interceptors. Interceptors on other hand most likely 
>>> depend on blocks they intercept. For example, jaas interceptor I am 
>>> working on needs access to block metadata.
>>
>>
>>
>> Yes, I agree.
>> But... (see next example)
>>
>>> I am not sure if interceptors need access to block state though.
>>
>>
>>
>> Block state?
>> You mean the Context?
>
> No, I meant hard data stored inside component instance.
>
>> Most probably yes. Think of an authentication interceptor; it must be 
>> able to see the info on the request, which also the block needs to see.
>> The fact is that both the interceptor and the block need to have 
>> specified the keys they will use.
>> Does this tie the two together somewhat, also the other way around?
>
> I agree, that Context as a common place for all sorts of context 
> parameters sounds cool, but there is no way to add something into a 
> Context.


Addition of something into a context is possible:

  Map map = new Hashtable();
  DefaultContext newContext = new DefaultContext( map, oldContext );
  // do anything you want with the map
  // then seal the context
  newContext.makeReadOnly();

Cheers, Steve.

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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


Mime
View raw message