@Override public int hashCode() { return app.hashCode(); }
public ApplicationResource(ApplicationName name, String label) { super(name.makeKey(), label); this.applicationName = name; }
public ApplicationResource(ResourceKey key, String label) { super(key, label); this.applicationName = ApplicationName.fromResourceKey(key); }
public ApplicationName getApplication() { if (StringUtil.isEmpty(appName)) return null; return ApplicationName.valueOf(appName); }
public static final CollectionSettingName getApplicationCollectionSettingName(ApplicationName appName) { return new CollectionSettingName(TYPE_NAME + "." + appName.getName(), GROUP_NAME); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; EndPointMemberAssocCacheKey other = (EndPointMemberAssocCacheKey) obj; return app.equals(other.app); } }
public TraceAnalysisService(ServerResource server, EndPointAnalyzer endpointAnalyzer, TraceErrorAnalyzer traceErrorAnalyzer, TraceTagAnalyzer traceTagAnalyzer, TopographyAnalysisService topoAnalysisService, TraceSourceAnalysisService traceSourceAnalysisService) { this.serverResolver = new ServerResourceResolver(server); this.errorAnalyzer = traceErrorAnalyzer; this.tagAnalyzer = traceTagAnalyzer; this.topographyAnalysisService = topoAnalysisService; this.endPointAnalyzer = endpointAnalyzer; this.applicationMetadata = ApplicationMetadataCache.getInstance(); this.sourceAnalysisService = traceSourceAnalysisService; }
public static ApplicationName applicationName(String host, String context) { StringBuilder id = new StringBuilder(); id.append(sanitize(host)).append(SEPARATOR); id.append(sanitize(context)); return ApplicationName.valueOf(id.toString()); }
public static final ResourceKey makeKey(ApplicationName application, ServerName server) { return ResourceKey.valueOf(ApplicationServer, application.getName() + "-" + server, "Application=" + StringUtil.smartQuoteObjectName(application.getName()) + ",Server=" + StringUtil.smartQuoteObjectName(server.toString())); }
public boolean filters(TraceInterface traceAccess) { ApplicationName appName = traceAccess.getAppName(); if (enabled.get() && ApplicationName.UNKOWN_APPLICATION.equals(appName)) { return true; } return false; }
public ApplicationEndPointResource(ApplicationName appName, EndPointName endPoint, String label, TraceSource source) { super(makeKey(appName, endPoint, source), label); this.applicationKey = appName.makeKey(); this.applicationName = appName; this.endPointName = endPoint; }
protected ApplicationName fromServletContext (ServletContext context) { String path=context.getContextPath(), name=context.getServletContextName(); if (StringUtil.isEmpty(path) || "/".equals(path)) { name = "insight"; } else if (path.charAt(0) == '/') { name = path.substring(1); } else { name = path; } return ApplicationName.valueOf("localhost", name); }
public ApplicationEndPointResource(ApplicationName appName, EndPointName endPoint, TraceSource source) { this(appName, endPoint, makeLabel(appName.getName(), endPoint.getName()), source); }
boolean queryMatchesApplication(ResourceQuery query, Resource resource) { ApplicationName app = query.getRequiredApplication(); if (app == null) { return true; } if (resource instanceof ApplicationAwareResource) { return ((ApplicationAwareResource) resource).getApplicationName().equals(app); } return false; }
public ApplicationServerResource(ApplicationName application, ServerName server, String label) { super(makeKey(application, server), label); this.applicationKey = application.makeKey(); this.serverKey = server.makeKey(); this.applicationName = application; this.serverName = server; }
public static SyncResourceCommand getApplicationResourceCommand() { ApplicationResource appRes = new ApplicationResource(ApplicationName.valueOf("appName"), "a label"); return new SyncResourceCommand(appRes); }
public ApplicationEndPointResource(ApplicationName appName, EndPointName endPoint) { this(appName, endPoint, makeLabel(appName.getName(), endPoint.getName()), null); }
public static Trace makeTraceTree(String app, String path, String traceId, TestFrameCreator creator) { ApplicationName appKey = ApplicationName.valueOf(app); return Trace.newInstance(appKey, TraceId.valueOf(traceId), makeFrameTree(path, 1, 1000, 3, 3, creator)); }
public ApplicationServerResource(ApplicationName application, ServerName server) { this(application, server, makeLabel(application.getName(), server.getName())); }
@Override public void serialize(ApplicationName value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeStartObject(); jgen.writeStringField("name", value.getName()); jgen.writeEndObject(); } }