Package server.protocol

Examples of server.protocol.Message


        PlayerList refPlayers = (PlayerList)inObj;
        client.getJoinedList().refreshPlayerList(refPlayers);
        client.getCurrentFrame().updateGUIForeign();
      }
      if(inObj.getClass().getSimpleName().equals("Message")){
        Message inboundMsg = (Message)inObj;
        processMessageInput(inboundMsg);
      }
      //client.getConnection().sendRcvdConfirmation(inObj);    //TEMPORARILY DISABLED
      break;
    case GAME_IN_PROGRESS:
      if(inObj.getClass().getSimpleName().equals("Dice")){
        Dice refreshedDice = (Dice)inObj;
        client.getDice().refershDice(refreshedDice);
        client.getCurrentFrame().updateGUIForeign();
        //System.out.println("Hetket�ringute (" + client.getDice().getDiceValues() + ") omanik: " + client.getDice().getCurOwner());
      }
      if(inObj.getClass().getSimpleName().equals("GameSheet")){
        GameSheet refGameSheet = (GameSheet)inObj;
        client.getGameSheet().refreshGameSheet(refGameSheet);
        client.getCurrentFrame().updateGUIForeign();
      }
      if(inObj.getClass().getSimpleName().equals("Leaderboard")){
        Leaderboard refLeaderboard = (Leaderboard)inObj;
        client.getLeaderboard().refreshLeaderboard(refLeaderboard);
        client.getCurrentFrame().updateGUIForeign();
      }
      if(inObj.getClass().getSimpleName().equals("Message")){
        Message inboundMsg = (Message)inObj;
        processMessageInput(inboundMsg);
      }
      //client.getConnection().sendRcvdConfirmation(inObj);    //TEMPORARILY DISABLED
      break;
    default:
View Full Code Here


    Iterator<ClientHandler> iterator = room.getClients().iterator();
    ClientHandler toHandler = null;
    while (iterator.hasNext()) {
      toHandler = (ClientHandler) iterator.next();
      toHandler.getObjectOutputStream().reset();
      toHandler.sendClientObject(new Message(message));
    }
  }
View Full Code Here

        toHandler.sendClientObject(room.getDice());
        break;
      case "DICE":
        toHandler.sendClientObject(room.getDice());
        if (toHandler != handler) {
          toHandler.sendClientObject(new Message(Messages.ROLLMSG(
              "test", room.getDice().getDiceValues().toString())));
        }
        break;
      case "GAMESHEET":
        toHandler.sendClientObject(room.getGameSheet());
View Full Code Here

  public void execute(ClientHandler handler, GameRoom room,
      List<String> splitted) throws IOException {
    data = (ClientInfo) handler.getClientData();
    wrongName = methods.chechForNameInUse(splitted.get(2), room);
    if (wrongName) {
      handler.sendClientObject(new Message(CommandList.NAMEINUSECMD));
      return;
    }
    data.setName(splitted.get(2));
    data.setJoinTime(new Date());
    data.setRoom(room);
View Full Code Here

TOP

Related Classes of server.protocol.Message

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.