You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Norman Maurer <nm...@byteaction.de> on 2007/01/03 18:14:31 UTC

[handlerapi-experiment] Adding HookResultHook

Hi guys,

just a quick update on the handlerapi-experiment sandbox.

I add a HookResultHook which let developers hook in directly after each
Hook return the HookResult... I used this hook now to let the
JunkScoreHandler work again. This also give developers the possibilty
to  do generic stuff on DENY, OK (For example accounting) etc.

bye
Norman



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


Re: [handlerapi-experiment] Adding HookResultHook

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> I add a HookResultHook which let developers hook in directly after each
> Hook return the HookResult... I used this hook now to let the
> JunkScoreHandler work again. This also give developers the possibilty
> to  do generic stuff on DENY, OK (For example accounting) etc.

I had no time to test this yet, but from a fast overview I like it!

We should probably move logging of ok/deny operations from specific 
hooks to this Hook result interceptor.

Furthermore I would probably use "HookResultHandler" or 
"HookResultInterceptor" instead of "HookResultHook" as this shouldn't be 
part of the "public hook api" (not needed for easy user-oriented tasks).

Stefano


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


Re: [handlerapi-experiment] Adding HookResultHook

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Stefano Bagnara schrieb:
>> We should probably move logging of ok/deny operations from specific
>> hooks to this Hook result interceptor.
> This sound like a good idea, but i have to think a bit more about this ..

The first that open the workspace should add this to TODO so we remember 
to test it.

>> Furthermore I would probably use "HookResultHandler" or
>> "HookResultInterceptor" instead of "HookResultHook" as this shouldn't
>> be part of the "public hook api" (not needed for easy user-oriented
>> tasks).
> I think i not agree.. Why you want this not in the "public hook api" ? I
> think there are some use cases which whould need it. For example update
> a database on each DENY for graphing etc .. Or just for statistic
> generation. But i agree that the name is probally not the best..

Ok. Let's call it HookResultInterceptor.

It is not important now wether it will be public or not: the important 
thing is that we find out wether it works and if we like it more than 
other approaches: and it seems we agree on this.

Stefano


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


Re: [handlerapi-experiment] Adding HookResultHook

Posted by Norman Maurer <nm...@byteaction.de>.
Stefano Bagnara schrieb:
> Norman Maurer wrote:
>> Stefano Bagnara schrieb:
>>> We should probably move logging of ok/deny operations from specific
>>> hooks to this Hook result interceptor.
>> This sound like a good idea, but i have to think a bit more about
>> this ..
>
> The first that open the workspace should add this to TODO so we
> remember to test it.
>

Done ;-)

>>> Furthermore I would probably use "HookResultHandler" or
>>> "HookResultInterceptor" instead of "HookResultHook" as this shouldn't
>>> be part of the "public hook api" (not needed for easy user-oriented
>>> tasks).
>> I think i not agree.. Why you want this not in the "public hook api" ? I
>> think there are some use cases which whould need it. For example update
>> a database on each DENY for graphing etc .. Or just for statistic
>> generation. But i agree that the name is probally not the best..
>
> Ok. Let's call it HookResultInterceptor.
>
> It is not important now wether it will be public or not: the important
> thing is that we find out wether it works and if we like it more than
> other approaches: and it seems we agree on this.
>
> Stefano
+1

Norman



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


Re: [handlerapi-experiment] Adding HookResultHook

Posted by Norman Maurer <nm...@byteaction.de>.
Stefano Bagnara schrieb:
> Norman Maurer wrote:
>> I add a HookResultHook which let developers hook in directly after each
>> Hook return the HookResult... I used this hook now to let the
>> JunkScoreHandler work again. This also give developers the possibilty
>> to  do generic stuff on DENY, OK (For example accounting) etc.
>
> I had no time to test this yet, but from a fast overview I like it!
:-)
>
> We should probably move logging of ok/deny operations from specific
> hooks to this Hook result interceptor.
This sound like a good idea, but i have to think a bit more about this ..
>
> Furthermore I would probably use "HookResultHandler" or
> "HookResultInterceptor" instead of "HookResultHook" as this shouldn't
> be part of the "public hook api" (not needed for easy user-oriented
> tasks).
I think i not agree.. Why you want this not in the "public hook api" ? I
think there are some use cases which whould need it. For example update
a database on each DENY for graphing etc .. Or just for statistic
generation. But i agree that the name is probally not the best..
>
> Stefano
>
bye
Norman



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