All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javasimon.javaee.reqreporter.StandardRequestReporter Maven / Gradle / Ivy

There is a newer version: 4.2.0
Show newest version
package org.javasimon.javaee.reqreporter;

/**
 * Reports request to standard output (instead of Manager's message method) and omits less specific Simons from
 * output (for instance JDBC's next).
 *
 * @author Richard "Virgo" Richter
 */
@SuppressWarnings("UnusedDeclaration")
public class StandardRequestReporter extends DefaultRequestReporter {
	@Override
	protected void reportMessage(String message) {
		System.out.println(message);
	}

	@Override
	protected boolean shouldBeAddedStopwatchInfo(StopwatchInfo info) {
		return !(isJdbcResultSetNextSimon(info));
	}

	private boolean isJdbcResultSetNextSimon(StopwatchInfo info) {
		return info.stopwatch.getName().contains(".sql.") && info.stopwatch.getName().endsWith(".next");
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy