Hi all,
In addition to the suggested workarounds, Id like to explore in the future if we could technically report such disconnection to the processing code. Ive entered this RFE: Add a way to detect client or server disconnection http://restlet.tigris.org/issues/show_bug.cgi?id=867 Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ <http://www.restlet.org/> http://www.restlet.org Noelios Technologies ~ Co-founder ~ <http://www.noelios.com/> http://www.noelios.com De : Joe Nellis [mailto:[email protected]] Envoyé : mardi 28 juillet 2009 05:45 À : [email protected] Objet : Re: Detecting client's disconnection Greetings, Here is some more regarding restlets and a resource ticket pattern. http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=4279 2> &dsMessageId=42792 You'll find more regarding asynchronous operations and transactions on page 229 of RESTful Web Services http://oreilly.com/catalog/9780596529260/ Joe. ----- Original Message ----- From: Stephen Groucutt <mailto:[email protected]> Newsgroups: gmane.comp.java.restlet To: [email protected] Sent: Monday, July 27, 2009 3:17 PM Subject: Re: Detecting client's disconnection Hi, You might find the following article helpful: http://benramsey.com/archives/http-status-201-created-vs-202-accepted/ In general, I think a REST API might handle your situation (a request that cannot complete immediately) by returning 202 Accepted, along with either body content or a Location header that points to a new resource location, which the client would then periodically poll until the long-running request was completed. I could be wrong, though... Steve On Sat, Jul 25, 2009 at 6:45 AM, John.Smith <[email protected]> wrote: Hi, I was searching the web back and forth and i didn't find a solution to the following problem (bear in mind that I'm making my first steps in Restlet). Client makes a request and the computation of the response is suspended untill another event occures. If the client disconnects when the computation is suspended the IO/Socket Exception is thrown. How can I handle such situation, so I can for instance clear some data structures hold for this client? Best regards jgs -- View this message in context: http://n2.nabble.com/Detecting-client%27s-disconnection-tp3325009p3325009.ht ml Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2375 504> &dsMessageId=2375504 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2380742

