synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <g...@thoughtcraft.com>
Subject Mediator adapters for ease of use
Date Thu, 02 Aug 2007 19:53:46 GMT
So right now, people building Synapse Mediators need to grok the 
MessageContext interface, and how to pull data from / push data to 
there.  Granted, not a huge problem, but Paul and I were talking earlier 
about the Class Mediator, and that got me thinking we might also 
consider a couple of convenience classes:

abstract class DOMMediator implements Mediator {
   public final boolean mediate(MessageContext synCtx) {
     // Get DOM, pass to...
   }

   // Here's what you override
   public abstract boolean mediate(Element element);
}

...and the same thing with StAXMediator, which hands off an 
XmlStreamReader instead of an Element.  In either case, we'd want an 
available switch to decide whether the passed object points to the 
entire SOAP envelope or just the first body element.

This is really just like Axis1's MessageProvider allowing operation 
signatures that take Element or SOAPEnvelope or MessageContext.

Does this actually seem useful, or is it really simple enough just to 
get the content from the MessageContext in the form you want?  I'm not 
sure, hence this mail. :)

Thanks,
--Glen

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


Mime
View raw message