summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-04-16 16:46:35 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2013-04-16 16:49:13 +0200
commitd8d846936cb37aafccb672074e3b8ee1d995f608 (patch)
treef0c7446b68cad9d2f89b32a5624d683eb9fb0624 /sonar-plugin-api/src/main
parentfb7248d86bc6b540567a2dcc8ee9cad6a615e254 (diff)
downloadsonarqube-d8d846936cb37aafccb672074e3b8ee1d995f608.tar.gz
sonarqube-d8d846936cb37aafccb672074e3b8ee1d995f608.zip
SONAR-4147 Support a new profiling option "sonar.profiling.log=true"
Diffstat (limited to 'sonar-plugin-api/src/main')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobExecutionHandler.java47
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobsPhaseHandler.java52
3 files changed, 104 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
index e55d31b0f76..3817bca9629 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
@@ -384,6 +384,11 @@ public interface CoreProperties {
String SCAN_TASK = "scan";
/**
+ * @since 3.6
+ */
+ String PROFILING_LOG_PROPERTY = "sonar.profiling.log";
+
+ /**
* @deprecated replaced in v3.4 by properties specific to languages, for example sonar.java.coveragePlugin
* See http://jira.codehaus.org/browse/SONARJAVA-39 for more details.
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobExecutionHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobExecutionHandler.java
new file mode 100644
index 00000000000..602178799e4
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobExecutionHandler.java
@@ -0,0 +1,47 @@
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2012 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ */
+package org.sonar.api.batch.events;
+
+import org.sonar.api.batch.PostJob;
+
+/**
+ * @since 3.6
+ */
+public interface PostJobExecutionHandler extends EventHandler {
+
+ /**
+ * This interface is not intended to be implemented by clients.
+ */
+ interface PostJobExecutionEvent {
+
+ PostJob getPostJob();
+
+ boolean isStart();
+
+ boolean isEnd();
+
+ }
+
+ /**
+ * Called before and after execution of {@link PostJob}.
+ */
+ void onPostJobExecution(PostJobExecutionEvent event);
+
+}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobsPhaseHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobsPhaseHandler.java
new file mode 100644
index 00000000000..da964a70489
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/PostJobsPhaseHandler.java
@@ -0,0 +1,52 @@
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2012 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ */
+package org.sonar.api.batch.events;
+
+import org.sonar.api.batch.PostJob;
+
+import java.util.List;
+
+/**
+ * @since 3.6
+ */
+public interface PostJobsPhaseHandler extends EventHandler {
+
+ /**
+ * This interface is not intended to be implemented by clients.
+ */
+ interface PostJobsPhaseEvent {
+
+ /**
+ * @return list of PostJob in the order of execution
+ */
+ List<PostJob> getPostJobs();
+
+ boolean isStart();
+
+ boolean isEnd();
+
+ }
+
+ /**
+ * Called before and after execution of all {@link PostJob}s.
+ */
+ void onPostJobsPhase(PostJobsPhaseEvent event);
+
+}