Re: Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException
exactly, like if(caught instanceof RequestTimeoutException){ //timeout } but u have explicetely to set timeout to support it, since as per default the timeout is set to 0 (no timeouts) On 12 Aug., 17:12, Jeff Chimene jchim...@gmail.com wrote: On 08/11/2010 06:12 PM, nokostar wrote: What is the best way of detecting a loss of network connectivity to the server? I have a GWT app that saves state to the server through an RPC. I would like to be able to detect when the connection to the servers fails so I can take appropriate action. I disconnected my network by removing the network cable on a client machine to see if I can be able to catch the InvocationException in the AsyncCallback's onFailure method with no luck at all. public void onFailure(Throwable caught) { GWT.log(RPC Failure,caught); if (caught instanceof InvocationException){ //do something } } Timeout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException
The timeout mechanism can be found here http://www.google.com/codesearch/p?hl=en#jxxBHps6Oxg/trunk/kiyaa/src/main/java/com/habitsoft/kiyaa/util/AsyncCallbackWithTimeout.java It's a bit complicated (otherwise you would have to overwrite the default generators of GWT-RPC). I would personally go for an annotation/generator scheme, smth like this: @TimeoutCapable(15000) interface MyService extends RemoteService { // . } That should work for most cases (unless you want different timeouts for different calls). On Aug 13, 2:35 pm, cokol eplisc...@googlemail.com wrote: exactly, like if(caught instanceof RequestTimeoutException){ //timeout } but u have explicetely to set timeout to support it, since as per default the timeout is set to 0 (no timeouts) On 12 Aug., 17:12, Jeff Chimene jchim...@gmail.com wrote: On 08/11/2010 06:12 PM, nokostar wrote: What is the best way of detecting a loss of network connectivity to the server? I have a GWT app that saves state to the server through an RPC. I would like to be able to detect when the connection to the servers fails so I can take appropriate action. I disconnected my network by removing the network cable on a client machine to see if I can be able to catch the InvocationException in the AsyncCallback's onFailure method with no luck at all. public void onFailure(Throwable caught) { GWT.log(RPC Failure,caught); if (caught instanceof InvocationException){ //do something } } Timeout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException
What is the best way of detecting a loss of network connectivity to the server? I have a GWT app that saves state to the server through an RPC. I would like to be able to detect when the connection to the servers fails so I can take appropriate action. I disconnected my network by removing the network cable on a client machine to see if I can be able to catch the InvocationException in the AsyncCallback's onFailure method with no luck at all. public void onFailure(Throwable caught) { GWT.log(RPC Failure,caught); if (caught instanceof InvocationException){ //do something } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException
yeah .. i am too interested to know how to handle network connection loss. Experts please help. Thanks, Subhro. On Thu, Aug 12, 2010 at 6:42 AM, nokostar courage.n...@gmail.com wrote: What is the best way of detecting a loss of network connectivity to the server? I have a GWT app that saves state to the server through an RPC. I would like to be able to detect when the connection to the servers fails so I can take appropriate action. I disconnected my network by removing the network cable on a client machine to see if I can be able to catch the InvocationException in the AsyncCallback's onFailure method with no luck at all. public void onFailure(Throwable caught) { GWT.log(RPC Failure,caught); if (caught instanceof InvocationException){ //do something } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException
On 08/11/2010 06:12 PM, nokostar wrote: What is the best way of detecting a loss of network connectivity to the server? I have a GWT app that saves state to the server through an RPC. I would like to be able to detect when the connection to the servers fails so I can take appropriate action. I disconnected my network by removing the network cable on a client machine to see if I can be able to catch the InvocationException in the AsyncCallback's onFailure method with no luck at all. public void onFailure(Throwable caught) { GWT.log(RPC Failure,caught); if (caught instanceof InvocationException){ //do something } } Timeout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.