Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.Timer.cancel()


         }

         @Override
         public void onError(ServerError error)
         {
            t.cancel();
            indicator_.onCompleted();
            // we can always create a new app
            contents_.setAppList(null, null);
         }
      });
View Full Code Here


    timer.schedule(1);
    return new Closeable() {
      @Override
      public void close() throws IOException {
        Thread.currentThread().interrupt();
        timer.cancel();
      }
    };
  }

  @Override
View Full Code Here

    timer.schedule((int)unit.convert(delay, TimeUnit.MILLISECONDS));
    return new Closeable() {
      @Override
      public void close() throws IOException {
        Thread.currentThread().interrupt();
        timer.cancel();
      }
    };
  }

  @Override
View Full Code Here

            run.run();
          } catch (Throwable ex) {
            Thread.currentThread().interrupt();
          }
          if (Thread.interrupted()) {
            timer.cancel();
          }
        }
      };
      @Override
      public void run() {
View Full Code Here

        }
      }
      @Override
      public void cancel() {
        Thread.currentThread().interrupt();
        timer.cancel();
        super.cancel();
      }
    };
    outerTimer.schedule((int)unit.convert(initialDelay, TimeUnit.MILLISECONDS));
    return new Closeable() {
View Full Code Here

                        public void onSuccess(UserData userData) {
                            if (userData != null) {
                                Application.get().setCurrentUser(userData.getUserId());
                                MessageBox.alert("New user created successfully and associated with your Open Id.");
                                timer.cancel();
                            }
                        }

                        public void onFailure(Throwable caught) {
                            timer.cancel();
View Full Code Here

                                timer.cancel();
                            }
                        }

                        public void onFailure(Throwable caught) {
                            timer.cancel();
                        }
                    });
                } else if (createUserRes != null
                        && createUserRes.equalsIgnoreCase(AuthenticationConstants.CREATE_USER_WINDOW_CLOSED)) {
                    timer.cancel();
View Full Code Here

                            timer.cancel();
                        }
                    });
                } else if (createUserRes != null
                        && createUserRes.equalsIgnoreCase(AuthenticationConstants.CREATE_USER_WINDOW_CLOSED)) {
                    timer.cancel();
                } else if (createUserRes != null
                        && createUserRes.equalsIgnoreCase(AuthenticationConstants.CREATE_USER_FOR_OPENID_FUN_FAIL)) {
                    MessageBox.alert("There was an error at creating the new user. Please try again later.");
                }
                Cookies.removeCookie(AuthenticationConstants.CREATE_USER_TO_ASSOC_OPENID_RESULT);
View Full Code Here

            public void run() {
                final Timer timer = this;
                long curTime = System.currentTimeMillis();
                long maxTime = 1000 * 60 * timeout;
                if (curTime - initTime > maxTime) {
                    timer.cancel();
                }

                String authenUserRes = Cookies.getCookie(AuthenticationConstants.AUTHEN_USER_TO_ASSOC_OPENID_RESULT);
                if (authenUserRes.equalsIgnoreCase(AuthenticationConstants.AUTHEN_USER_TO_ASSOC_OPENID_SUCCESS)) {
                    OpenIdServiceManager.getInstance().checkIfUserAuthenticatedToAssocOpenId(
View Full Code Here

                            new AsyncCallback<UserData>() {

                                public void onSuccess(UserData userData) {
                                    if (userData != null) {
                                        Application.get().setCurrentUser(userData.getUserId());
                                        timer.cancel();
                                        MessageBox.alert("Your user account was successfully associated with your OpenId. <br /><br/>" +
                                            "For future sessions, you can simply sign in with your OpenId account.");
                                    }
                                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.