public static boolean checkMessageFormat(PCEPMessage message) {
    PCEPCommonMessageHeader messageHeader = message.getMessageHeader();
    LinkedList<PCEPObjectFrame> objectsList = message.getObjectsList();

    int messageType = messageHeader.getTypeDecimalValue();

    switch (messageType) {
      case 0:
        { // UNDEFIND MSG
          return false;
        }

      case 1:
        {
          if (objectsList.size() > 1) {
            return false;
          }

          PCEPCommonObjectHeader objectHeader = objectsList.get(0).getObjectHeader();

          if (objectHeader.getClassDecimalValue() != 1 || objectHeader.getTypeDecimalValue() != 1) {
            return false;
          }

          return true; // TODO
        }

      case 2:
        { // KEEPALIVE MSG
          return true; // TODO
        }
      case 3:
        { // PATH COMPUTATION REQUEST MSG
          return true; // TODO
        }
      case 4:
        { // PATH COMPUTATION REPLY MSG
          return true; // TODO
        }
      case 5:
        { // NOTIFICATION MSG
          return true; // TODO
        }
      case 6:
        { // ERROR MSG
          return true; // TODO
        }
      case 7:
        { // CLOSE MSG
          return true; // TODO
        }
      default:
        { // UNDEFIND MSG
          return true;
        }
    }
  }