Package de.creepsmash.common.messages.server

Examples of de.creepsmash.common.messages.server.PasswordResetResponseMessage


      } else if (message instanceof PasswordResetRequestMessage) {
        PasswordResetRequestMessage passwordResetRequestMessage = (PasswordResetRequestMessage) message;
        boolean result = this.authenticationService
            .resetPassword(passwordResetRequestMessage
                .getPlayername());
        PasswordResetResponseMessage resetResponse = new PasswordResetResponseMessage();
        if (result) {
          resetResponse.setResponseType(IConstants.ResponseType.ok);
        } else {
          resetResponse
              .setResponseType(IConstants.ResponseType.failed);
        }
        this.getClient().send(resetResponse);
        return this;
      } else if (message instanceof LoginRequestMessage) {
View Full Code Here


    } else if (DeleteResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new DeleteResponseMessage();
    } else if (PasswordResetResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new PasswordResetResponseMessage();
    } else {
      // TODO logging
      System.err.println("Invalid message:\"" + messageString + "\"");
    }
View Full Code Here

        send.setEnabled(true);
      }
    }
   
    if (m instanceof PasswordResetResponseMessage) {
      PasswordResetResponseMessage prrm = (PasswordResetResponseMessage) m;
     
      if (prrm.getResponseType() == IConstants.ResponseType.ok) {
        UIManager.put("OptionPane.background", Color.BLACK);
        UIManager.put("OptionPane.JButton.setForground", Color.BLACK);
        UIManager.put("Panel.background", Color.BLACK);
        UIManager.put("OptionPane.messageForeground", Color.GREEN);
        JOptionPane.showMessageDialog(this, "Sending a new Password was successful!",
            "Check Mail!", JOptionPane.ERROR_MESSAGE);
      }
      if (prrm.getResponseType() == IConstants.ResponseType.failed) {
        errorDialog("Sending a new password failed! \n\n"
            + "Perhaps you didn't set your email address or the typed "
            + "username doesn't exist?");
        this.setGameScreenFocus(lName);
      }
View Full Code Here

TOP

Related Classes of de.creepsmash.common.messages.server.PasswordResetResponseMessage

Copyright © 2018 www.massapicom. 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.