"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "moskito-webui/src/main/java/net/anotheria/moskito/webui/util/APILookupUtility.java" between
moskito-moskito-2.9.3.tar.gz and moskito-moskito-2.10.0.tar.gz

About: MoSKito (Monitoring System Kit) is a framework for java application monitoring. Sources.

APILookupUtility.java  (moskito-moskito-2.9.3):APILookupUtility.java  (moskito-moskito-2.10.0)
package net.anotheria.moskito.webui.util; package net.anotheria.moskito.webui.util;
import net.anotheria.anoplass.api.API; import net.anotheria.anoplass.api.API;
import net.anotheria.anoplass.api.APIFinder; import net.anotheria.anoplass.api.APIFinder;
import net.anotheria.moskito.webui.MoSKitoWebUIContext; import net.anotheria.moskito.webui.MoSKitoWebUIContext;
import net.anotheria.moskito.webui.accumulators.api.AccumulatorAPI; import net.anotheria.moskito.webui.accumulators.api.AccumulatorAPI;
import net.anotheria.moskito.webui.auth.api.AuthApi; import net.anotheria.moskito.webui.auth.api.AuthApi;
import net.anotheria.moskito.webui.dashboards.api.DashboardAPI; import net.anotheria.moskito.webui.dashboards.api.DashboardAPI;
import net.anotheria.moskito.webui.gauges.api.GaugeAPI; import net.anotheria.moskito.webui.gauges.api.GaugeAPI;
import net.anotheria.moskito.webui.journey.api.JourneyAPI; import net.anotheria.moskito.webui.journey.api.JourneyAPI;
import net.anotheria.moskito.webui.loadfactors.api.LoadFactorsAPI;
import net.anotheria.moskito.webui.nowrunning.api.NowRunningAPI;
import net.anotheria.moskito.webui.producers.api.ProducerAPI; import net.anotheria.moskito.webui.producers.api.ProducerAPI;
import net.anotheria.moskito.webui.shared.api.AdditionalFunctionalityAPI; import net.anotheria.moskito.webui.shared.api.AdditionalFunctionalityAPI;
import net.anotheria.moskito.webui.tags.api.TagAPI; import net.anotheria.moskito.webui.tags.api.TagAPI;
import net.anotheria.moskito.webui.threads.api.ThreadAPI; import net.anotheria.moskito.webui.threads.api.ThreadAPI;
import net.anotheria.moskito.webui.threshold.api.ThresholdAPI; import net.anotheria.moskito.webui.threshold.api.ThresholdAPI;
import net.anotheria.moskito.webui.tracers.api.TracerAPI; import net.anotheria.moskito.webui.tracers.api.TracerAPI;
import org.distributeme.core.ServiceDescriptor; import org.distributeme.core.ServiceDescriptor;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
skipping to change at line 162 skipping to change at line 164
APIFinder.findAPI(TracerAPI.class) : APIFinder.findAPI(TracerAPI.class) :
findRemote(TracerAPI.class); findRemote(TracerAPI.class);
} }
public static TagAPI getTagAPI(){ public static TagAPI getTagAPI(){
return isLocal() ? return isLocal() ?
APIFinder.findAPI(TagAPI.class) : APIFinder.findAPI(TagAPI.class) :
findRemote(TagAPI.class); findRemote(TagAPI.class);
} }
public static LoadFactorsAPI getLoadFactorsAPI() {
return isLocal() ?
APIFinder.findAPI(LoadFactorsAPI.class) :
findRemote(LoadFactorsAPI.class);
}
public static NowRunningAPI getNowRunningAPI() {
return isLocal() ?
APIFinder.findAPI(NowRunningAPI.class) :
findRemote(NowRunningAPI.class);
}
public static void resetConnection(){ public static void resetConnection(){
setCurrentConnectivityMode(ConnectivityMode.LOCAL); setCurrentConnectivityMode(ConnectivityMode.LOCAL);
} }
private static <T extends API> T findRemote(Class<T> targetClass){ private static <T extends API> T findRemote(Class<T> targetClass){
String serviceId = null; String serviceId = null;
try{ try{
Class constantsClass = Class.forName(targetClass.getPacka ge().getName()+".generated."+targetClass.getSimpleName()+"Constants"); Class constantsClass = Class.forName(targetClass.getPacka ge().getName()+".generated."+targetClass.getSimpleName()+"Constants");
Method m = constantsClass.getMethod("getServiceId"); Method m = constantsClass.getMethod("getServiceId");
serviceId = (String)m.invoke(null); serviceId = (String)m.invoke(null);
 End of changes. 2 change blocks. 
0 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)