<div dir="ltr">Hi Stuart,<div><br></div><div>i am new to Undertow code, Can you please elaborate.</div><div><br><div>yes, The exchange will be passed to the ResponseCommitListener, but From exchange i cannot get the response content directly ,correct? as there is no method to get the Response body like getResponseHeaders.</div><div><br></div><div>so i would need something like  a conduit inside my ResponseCommitListener to get a handle on the response content?</div><div>Any other straight forward way to get the response content using exchange object?</div><div><br></div><div>Thanks for all the help.</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 27, 2017 at 3:50 PM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You have access to the exchange, it is passed into the ResponseCommitListener.<br>
<br>
Stuart<br>
<br>
On Mon, Feb 27, 2017 at 4:25 PM, Rohan Emmanuel<br>
<div class="HOEnZb"><div class="h5">&lt;<a href="mailto:rohan.emmanuel07@gmail.com">rohan.emmanuel07@gmail.com</a>&gt; wrote:<br>
&gt; hi Stuart,<br>
&gt; I have a ResponseCommitListener added to my handler, I want this to write to<br>
&gt; the cache, so that my reponseWrapper will take of the error handling if the<br>
&gt; ResponsecommitListener faces any error while storing the response to cache.<br>
&gt;<br>
&gt; I understand HttpResponseConduit constructs the headers and then pushes the<br>
&gt; response.<br>
&gt; But the confusion is, how will i get a access to response Headers and body<br>
&gt; in the my ResponseCommitListener?<br>
&gt;<br>
&gt;<br>
&gt; My approach is valid? if not ,any suggestion?<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Feb 27, 2017 at 8:03 AM, Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com">sdouglas@redhat.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Whatever code is writing to the cache needs to just hold onto the<br>
&gt;&gt; exchange and send an error response as required.<br>
&gt;&gt;<br>
&gt;&gt; Stuart<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Feb 24, 2017 at 5:31 PM, Rohan Emmanuel<br>
&gt;&gt; &lt;<a href="mailto:rohan.emmanuel07@gmail.com">rohan.emmanuel07@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt; i had a similar query, i want to store the entire response for my book<br>
&gt;&gt; &gt; keeping , before it is flush out on to socket connection.<br>
&gt;&gt; &gt; if while storing the response(using a cache to store) any IO error<br>
&gt;&gt; &gt; occurs ,<br>
&gt;&gt; &gt; i want to send out 500 error instead.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Any thoughts on how can this be achieved?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Regards,<br>
&gt;&gt; &gt; Rohan Emmanuel<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; ______________________________<wbr>_________________<br>
&gt;&gt; &gt; undertow-dev mailing list<br>
&gt;&gt; &gt; <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/undertow-dev</a><br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; undertow-dev mailing list<br>
&gt;&gt; <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/undertow-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Regards,<br>
&gt; Rohan Emmanuel<br>
______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/undertow-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<br>Rohan Emmanuel</div></div>
</div>