axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Daniels" <>
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
> > handlers to make sure they run before anything else "real" happens.
> >
> > [snip]
> >
> > NOTE : the "jukebox" handler is special.  He contains a registry of ALL
> > elements that ANY of his "contained" handlers might be interested in.
> > the Manager asks if he's interested in a particular thing, he answers
> > 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
> > of JUST the jukebox handler.  Essentially this is a place in the
> > where any/all of the handlers (H1, H2, H3) can parse/run in any order.
> > 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
> > ContentHandler one - rather there will be an extra argument to every
> > containing the MessageContext.  This allows the Handlers to be stateless
> > 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).


View raw message