Hi Using OutputRepresentation subclass works.
I have problem with the logger, though. What I had in mind is fairly simple: - client sends a request to the server and after setting up some data structures, processing of this request is suspended on certain object - when the client breaks the suspended connection the exception is thrown and caught by the logger - the logger wakes the suspended thread and some data structures are cleared I tried using it, but it turns out, that all exceptions thrown during handling a request are send to the logger after the request is processed. So its clear that in this case we can't detect clients disconnection. Is there a way to force sending information about exceptions to the logger as soon as they are thrown? Thanks again and best regards jgw jlouvel wrote: > > Hi John, > > Checking the log is definitely a possibility. > > Are you using an OutputRepresentation subclass? If so, in your > write(OutputStream) method, you should be able to catch an IOException if > you can't write anymore and clean-up what you want. > > Best regards, > Jerome Louvel > -- > Restlet ~ Founder and Lead developer ~ http://www.restlet.org > Noelios Technologies ~ Co-founder ~ http://www.noelios.com > > > > -----Message d'origine----- > De : John.Smith [mailto:[email protected]] > Envoyé : vendredi 7 août 2009 10:51 > À : [email protected] > Objet : RE: Detecting client's disconnection > > Hi, > > Thanks a lot for for your suggestions, but I'm afraid the ticket pattern > isn't a solution in this case. The 'permanent' connection I was talking > about, indicates whether client is active or has crashed. The server > should > have the information about the client's status as soon as possible. I'd > like > also to avoid situation where all clients send regular messages indicating > that they are still alive. So I guess there is no way to for example set > up > a listener for the restlet engine exceptions? Should I check the logger > for > that kind of information? > > Best regards > jgs > > -- > View this message in context: > http://n2.nabble.com/Detecting-client%27s-disconnection-tp3325009p3403097.ht > ml > Sent from the Restlet Discuss mailing list archive at Nabble.com. > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23812 > 21 > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2384443 > > -- View this message in context: http://n2.nabble.com/Detecting-client-s-disconnection-tp3325009p3547579.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2388663

