Package com.google.gwt.user.client

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


                                            "For future sessions, you can simply sign in with your OpenId account.");
                                    }
                                }

                                public void onFailure(Throwable caught) {
                                    timer.cancel();

                                }
                            });

                } else if (authenUserRes.equalsIgnoreCase(AuthenticationConstants.AUTHEN_USER_WINDOW_CLOSED)) {
View Full Code Here


                                }
                            });

                } else if (authenUserRes.equalsIgnoreCase(AuthenticationConstants.AUTHEN_USER_WINDOW_CLOSED)) {
                    timer.cancel();
                } else if (authenUserRes.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.AUTHEN_USER_TO_ASSOC_OPENID_RESULT);
            }
View Full Code Here

            // in using open id
            public void run() {
                final Timer timer = this;
                long curTime = System.currentTimeMillis();
                if (curTime - initTime > 900000) {//15min
                    timer.cancel();
                }
                OpenIdServiceManager.getInstance().isOpenIdInSessForAddNewOpenId(new AsyncCallback<UserData>() {

                    public void onSuccess(UserData userData) {
                        if (!userData.getUserId().isGuest()) { //open id URL is already associated
View Full Code Here

                    public void onSuccess(UserData userData) {
                        if (!userData.getUserId().isGuest()) { //open id URL is already associated
                            UserId userId = userData.getUserId();
                            MessageBox.alert("Open Id already associated with WebProtege user '" + userId.getUserName() + "'.");
                            timer.cancel();
                        }
                        else { // associate open id to current user
                            UserId name = Application.get().getUserId();

                            OpenIdServiceManager.getInstance().assocNewOpenIdToUser(name.getUserName(), new AsyncCallback<OpenIdData>() {
View Full Code Here

                                public void onFailure(Throwable caught) {

                                }
                            });
                            timer.cancel();
                        }

                    }

                    public void onFailure(Throwable caught) {
View Full Code Here

                        }

                    }

                    public void onFailure(Throwable caught) {
                        timer.cancel();
                    }
                });
            }
        };
        addOpenIdTimer.scheduleRepeating(2000);
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();
                }
                AdminServiceManager.getInstance().checkUserLoggedInMethod(new AsyncCallback<String>() {

                    public void onSuccess(String loggedInMethod) {
                        if (loggedInMethod != null) {
View Full Code Here

                }
                AdminServiceManager.getInstance().checkUserLoggedInMethod(new AsyncCallback<String>() {

                    public void onSuccess(String loggedInMethod) {
                        if (loggedInMethod != null) {
                            timer.cancel();
                            if (loggedInMethod.equals(AuthenticationConstants.LOGIN_METHOD_WEBPROTEGE_ACCOUNT)) {
                                checkUserNameInSession();
                            }
                            else if (loggedInMethod.equals(AuthenticationConstants.LOGIN_METHOD_OPEN_ID_ACCOUNT)) {
                                checkIfOpenIdInSessionForLogin();
View Full Code Here

                        }
                    }

                    public void onFailure(Throwable caught) {
                        timer.cancel();
                    }
                });
                String loginSynId = Cookies.getCookie(AuthenticationConstants.HTTPS_WINDOW_CLOSED_COOKIE + "." + randomNumber);
                if (randomNumber != null && loginSynId != null) {
                    timer.cancel();
View Full Code Here

                        timer.cancel();
                    }
                });
                String loginSynId = Cookies.getCookie(AuthenticationConstants.HTTPS_WINDOW_CLOSED_COOKIE + "." + randomNumber);
                if (randomNumber != null && loginSynId != null) {
                    timer.cancel();
                    Cookies.removeCookie(AuthenticationConstants.HTTPS_WINDOW_CLOSED_COOKIE + "." + randomNumber);
                }
            }
        };
        checkSessionTimer.scheduleRepeating(2000);
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.