@Override
  public void messageHandler(String messageName, Object messagePayload) {
    if (messagePayload != null) {
      System.out.println("RCV (model): "+messageName+" | "+messagePayload.toString());
    } else {
      System.out.println("RCV (model): "+messageName+" | No data sent");
    }
    MessagePayload payload = (MessagePayload)messagePayload;
    int field = payload.getField();
    int direction = payload.getDirection();
    
    if (direction == Constants.UP) {
      if (field == 1) {
        setVariable1(getVariable1()+Constants.UP);
      } else {
        setVariable2(getVariable2()+Constants.UP);
      }
    } else {
      if (field == 1) {
        setVariable1(getVariable1()+Constants.DOWN);
      } else {
        setVariable2(getVariable2()+Constants.DOWN);
      }      
    }
  }