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: writing handlers
Date Fri, 01 Jun 2001 14:35:14 GMT
> As for a use-case - write a header handler.  Would you rather
> write something like DebugHandler+DebugHeader or just a simple class
> with one method in it?  I know which one is easier to me.

Oh, I didn't actually notice this the first readthrough.

So, OK, I write:

class DebugHeaderHandler {
    public setDebugLevel(int level) { ...code... };
}

and then I deploy something like:

<headerHandler class="DebugHeaderHandler" qName="dbg:Debug"
               type="xsd:int" method="setDebugLevel"/>

Look about right?

OK, now you have the question of where you store whatever context data you got
from the header.  If it's a separate class like this, you need either a static
place to put context (like the Debug class), or you need some model of how you
share information between the header handler classes and a) other header
handlers, and b) service classes.  This can get complicated pretty fast, and it
allows a lot of non-standard models for information sharing, which might reduce
interoperability.

--Glen



Mime
View raw message