public class ServletPluginRuntimeDescriptor extends PluginRuntimeDescriptor { public static final String PLUGIN_NAME = "servlet"; private static final ServletPluginRuntimeDescriptor INSTANCE = new ServletPluginRuntimeDescriptor(); private static final List<? extends EndPointAnalyzer> epAnalyzers = ArrayUtil.asUnmodifiableList( LifecycleEndPointAnalyzer.getInstance(), RequestDispatchEndPointAnalyzer.getInstance(), ServletEndPointAnalyzer.getInstance()); private static final List<? extends TraceErrorAnalyzer> errAnalyzers = ArrayUtil.asUnmodifiableList(HttpStatusTraceErrorAnalyzer.getInstance()); private static final List<? extends TraceSourceAnalyzer> tsAnalyzers = ArrayUtil.asUnmodifiableList(HttpTraceSourceAnalyzer.getInstance()); private static final List<? extends MetricsGenerator> mGenerators = ArrayUtil.asUnmodifiableList(RequestResponseSizeMetricsGenerator.getInstance()); private ServletPluginRuntimeDescriptor() { super(); } public static final ServletPluginRuntimeDescriptor getInstance() { return INSTANCE; } @Override public Collection<? extends EndPointAnalyzer> getEndPointAnalyzers() { return epAnalyzers; } @Override public Collection<? extends TraceErrorAnalyzer> getTraceErrorAnalyzers() { return errAnalyzers; } @Override public Collection<? extends TraceSourceAnalyzer> getTraceSourceAnalyzers() { return tsAnalyzers; } @Override public Collection<? extends MetricsGenerator> getMetricsGenerators() { return mGenerators; } @Override public String getPluginName() { return PLUGIN_NAME; } }
public static String safeToString(char... chars) { if (ArrayUtil.length(chars) <= 0) { return ""; } else { return new String(chars); } }
public class LoggingPluginRuntimeDescriptor extends PluginRuntimeDescriptor { public static final String PLUGIN_NAME = "logging"; private static final LoggingPluginRuntimeDescriptor INSTANCE = new LoggingPluginRuntimeDescriptor(); private static final List<? extends TraceErrorAnalyzer> errAnalyzers = ArrayUtil.asUnmodifiableList(LoggingTraceErrorAnalyzer.getInstance()); private LoggingPluginRuntimeDescriptor() { super(); } public static final LoggingPluginRuntimeDescriptor getInstance() { return INSTANCE; } @Override public Collection<? extends TraceErrorAnalyzer> getTraceErrorAnalyzers() { return errAnalyzers; } @Override public String getPluginName() { return PLUGIN_NAME; } }
private static OperationList assertDataBinderFields( OperationList list, String key, String... names) { assertNotNull(key + ": no list", list); assertEquals(key + ": mismatched length", ArrayUtil.length(names), list.size()); for (int index = 0; index < list.size(); index++) { String expected = names[index], actual = list.get(index, String.class); assertEquals(key + ": mismatched value at index=" + index, expected, actual); } return list; }
public class Ejb3PluginRuntimeDescriptor extends PluginRuntimeDescriptor { public static final String PLUGIN_NAME = "ejb3"; private static final Ejb3PluginRuntimeDescriptor INSTANCE = new Ejb3PluginRuntimeDescriptor(); private static final List<? extends EndPointAnalyzer> epAnalyzers = ArrayUtil.asUnmodifiableList(Ejb3LocalServiceEndPointAnalyzer.getInstance()); private Ejb3PluginRuntimeDescriptor() { super(); } public static final Ejb3PluginRuntimeDescriptor getInstance() { return INSTANCE; } @Override public Collection<? extends EndPointAnalyzer> getEndPointAnalyzers() { return epAnalyzers; } @Override public String getPluginName() { return PLUGIN_NAME; } }