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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home