Paul Sandoz wrote:
> Rather than a facade should we be using a DecoderFactory that returns a
> Decoder for a given content type? There can be DecoderFactory instance
> per pipe (and it could cache Decoder instances appropriately).
I think they are really the same thing. If you design a DecoderFactory
in a way that reuses Decoders, it will be probably implementing Decoder
interface by itself.
I agree that DecoderFacade could be implemented in a bit more generic
way, not just for MTOM vs SOAP.
> This also means it is possible to clearly separate XML decoding and FI
> decoding instances. Even though the StAX API is used for the most part i
> think this is useful for initiation and may potentially be useful for
> future optimization (e.g. SOAP header blocks could be processed in a
> different manner to create the stream buffer).
Yes, and it's good for modularity, too.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com