com.nepxion.discovery.plugin.strategy.monitor.StrategyMonitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discovery-plugin-strategy Show documentation
Show all versions of discovery-plugin-strategy Show documentation
Nepxion Discovery is an enhancement for Spring Cloud Discovery
package com.nepxion.discovery.plugin.strategy.monitor;
/**
* Title: Nepxion Discovery
* Description: Nepxion Discovery
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @version 1.0
*/
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
public class StrategyMonitor {
@Autowired(required = false)
protected StrategyLogger strategyLogger;
@Autowired(required = false)
protected StrategyTracer strategyTracer;
public void loggerOutput() {
if (strategyLogger != null) {
strategyLogger.loggerOutput();
}
}
public void loggerClear() {
if (strategyLogger != null) {
strategyLogger.loggerClear();
}
}
public void loggerDebug() {
if (strategyLogger != null) {
strategyLogger.loggerDebug();
}
}
public void spanBuild() {
if (strategyTracer != null) {
strategyTracer.spanBuild();
}
}
public void spanOutput(Map contextMap) {
if (strategyTracer != null) {
strategyTracer.spanOutput(contextMap);
}
}
public void spanError(Throwable e) {
if (strategyTracer != null) {
strategyTracer.spanError(e);
}
}
public void spanFinish() {
if (strategyTracer != null) {
strategyTracer.spanFinish();
}
}
public StrategyLogger getStrategyLogger() {
return strategyLogger;
}
public StrategyTracer getStrategyTracer() {
return strategyTracer;
}
}