Examples of ConfirmationCallback


Examples of javax.security.auth.callback.ConfirmationCallback

  protected void confirmDestIfDupeExisted() throws IOException, UnsupportedCallbackException, FailedLoginException {
    Callback[] cb;
    Player dupe = getDupe();
    if (dupe != null) {
      // we need to dest this player if they say yes
      ConfirmationCallback alreadyPlaying = new ConfirmationCallback("You are already playing. Throw the other copy out?", ConfirmationCallback.INFORMATION, ConfirmationCallback.YES_NO_OPTION, ConfirmationCallback.NO);
      cb = createCallbackArray(alreadyPlaying);
      getCallbackHandler().handle(cb);
      if (alreadyPlaying.getSelectedIndex() == ConfirmationCallback.YES) {
        dupe.getRegistry().dest(dupe, true);
      } else {
        throw new FailedLoginException("cannot log in, already logged in!");
      }
    }
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.