org.sonar.api.batch
Interface Sensor

All Superinterfaces:
BatchComponent, BatchExtension, CheckProject, Extension
All Known Implementing Classes:
AbstractSourceImporter

Deprecated. since 4.5 use Sensor

@Deprecated
public interface Sensor
extends BatchExtension, CheckProject

A Sensor is invoked once during the analysis of a project. The sensor can parse a flat file, connect to a web server... Sensor are generally used to add measure at the lowest level of the resource tree. A sensor can access and save measures on the whole tree of resources.

For example the Cobertura Sensor parses Cobertura report and saves the first-level of measures on resources.

A particular attention should be given to resource exclusion. Sonar already manages exclusions at file level : if you try to save a measure on a resource that is excluded in the settings, then Sonar will not save the measure. When handling a plugin or an external tool, you should make sure that exclusions are passed if you are going to get back consolidated data.

Since:
1.10

Field Summary
static String FLAG_SQUID_ANALYSIS
          Deprecated. Sensors that depend upon Squid must declare the following method :
 
Method Summary
 void analyse(Project module, SensorContext context)
          Deprecated. The method that is going to be run when the sensor is called
 
Methods inherited from interface org.sonar.api.batch.CheckProject
shouldExecuteOnProject
 

Field Detail

FLAG_SQUID_ANALYSIS

static final String FLAG_SQUID_ANALYSIS
Deprecated. 
Sensors that depend upon Squid must declare the following method :
 @DependsUpon
 public String dependsUponSquidAnalysis() {
   return Sensor.FLAG_SQUID_ANALYSIS;
 }
 

See Also:
Constant Field Values
Method Detail

analyse

void analyse(Project module,
             SensorContext context)
Deprecated. 
The method that is going to be run when the sensor is called

Parameters:
module - the module the sensor runs on
context - the context


Copyright © 2009–2014 SonarSource. All rights reserved.