Thanks Ravindra. Does it mean that the message won't get built till the mediation engine reaches the first content aware mediator in the sequence ?
Rushmin On Thu, Oct 23, 2014 at 11:18 PM, Ravindra Ranwala <[email protected]> wrote: > Hi Rushmin, > > If the mediator is a content aware one, the Axis2 Engine should build the > message using a message builder into our internal canonical form before > passing it to the mediate method of the content aware mediator. The mediate > method accepts that internal canonical format and conducts the mediation on > it. Building the message is NOT a responsibility of the mediator. For an > example instance a Filter mediator with a regular xpath expression which > accesses message content can be considered as a content aware mediator. > > > > Thanks & Regards, > > On Thu, Oct 23, 2014 at 11:04 PM, Rushmin Fernando <[email protected]> > wrote: > >> Thanks isuru for the detailed reply! >> >> So when a message is passed to the mediate() method, is it prebuilt if >> the mediator is a content aware one? Or is it the respinsibility of the >> mediator to build the message? >> On Oct 23, 2014 1:04 PM, "Isuru Ranawaka" <[email protected]> wrote: >> >>> Hi Rushmin, >>> >>> According to the nhttp architecture it uses two buffers for request >>> read(Input Stream) and request write to BE(output stream). But those two >>> buffers has raw byte stream.But in the mediation layer requests are >>> represent as OMElements.So InputStream is need to convert OMElement and >>> again to OutputStream so that is handle by Axis2 Level message builders >>> and formatters. Message builders create OMElement from input stream and >>> formatters again serialized it. So before moving to mediation layer >>> messages are converted to OMElement but this not fully build of the message >>> this is only partially build because it uses Steaming API (Stax parser) how >>> ever it has significant build overhead comparing to raw byte stream. >>> >>> If mediators are content aware then message is actually fully read to >>> the memory by Streaming API. But if you used binary relay in nhttp >>> transport then messages are processed as byte streams with out partially or >>> fully building of the message.But it can not be used with content aware >>> mediators. >>> >>> thanks >>> IsuruR >>> >>> On Thu, Oct 23, 2014 at 9:30 PM, Rushmin Fernando <[email protected]> >>> wrote: >>> >>>> Does the framework build the message before it submits a message for >>>> mediation to a content aware mediator >>>> >>>> or >>>> >>>> does it build the message upfront if there is a content mediator in >>>> possible sequence paths ? >>>> >>>> Thanks >>>> Rushmin >>>> >>>> >>>> >>>> -- >>>> *Rushmin Fernando* >>>> *Technical Lead* >>>> >>>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware >>>> >>>> email : [email protected] >>>> mobile : +94772310855 >>>> >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Best Regards >>> Isuru Ranawaka >>> M: +94714629880 >>> Blog : http://isurur.blogspot.com/ >>> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Ravindra Ranwala > Software Engineer > WSO2, Inc: http://wso2.com > <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> > Mobile: +94714198770 > > -- *Rushmin Fernando* *Technical Lead* WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware email : [email protected] mobile : +94772310855
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
