axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Daniels" <gdani...@macromedia.com>
Subject Re: New Handler design - what do you think??
Date Fri, 25 May 2001 01:39:17 GMT
> > Handlers may be "gated" or not.  If a Handler is "gated", that means no
> > Handler after it in chain order may actually run until it "ungates"
> > (finishes its own processing).  This is to allow things like
authorization
> > handlers to make sure they run before anything else "real" happens.
> >
> > [snip]
> >
> > NOTE : the "jukebox" handler is special.  He contains a registry of ALL
the
> > elements that ANY of his "contained" handlers might be interested in.
When
> > the Manager asks if he's interested in a particular thing, he answers
"yes"
> > if he has an internal Handler registered for that thing.  This is, IMHO,
> > going to be an extremely common use case of Axis; many chains will
consist
> > of JUST the jukebox handler.  Essentially this is a place in the
processing
> > where any/all of the handlers (H1, H2, H3) can parse/run in any order.
I
> > don't use it in the example, but I did want to mention it as important.
>
> Is the "jukebox" handler gated?  If so, how does it know when to ungate?

The jukebox is never gated, nor may anything inside it be gated.  If you
care about ordering/gating, you put Handlers on the chain explicitly.  Hm.
Actually I could see the jukebox containing a sub-chain which itself has
gating, though.  But that chain wouldn't gate anything else in the jukebox.

As Rob astutely points out, the "jukebox" is really just a
"sub-messageDispatcher" with a few constraints.

> >
> > IMPORTANT : Handlers may PARSE events at will, caching them internally
> >
> > [snip]
> >
> > The interface for Handlers to process SAX events will not be the
standard
> > ContentHandler one - rather there will be an extra argument to every
event
> > containing the MessageContext.  This allows the Handlers to be stateless
and
> > shareable across threads.
>
> OK, so where is "internally" in a stateless object?

I misspoke.  I should have said "caching them in a well-known place in the
MessageContext" if we want to go the stateless route (which I like).

--Glen



Mime
View raw message