Examples of EndPointAnalysis


Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

        String workspaceName = op.get("workspace", String.class);
        String repoName = op.get("repository", String.class);
        String endPointName = repoName + (workspaceName != null ? "." + workspaceName : "");

        return new EndPointAnalysis(EndPointName.valueOf(endPointName), "JCR: " + endPointName, endPointName, getOperationScore(op, depth), op);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

    @Test
    public void testAnalyzeNoHttpFrame() {
        Operation op = createControllerOperation(false);
        Frame frame = new SimpleFrame(FrameId.valueOf("3777347"), null, op, new TimeRange(1L, 10L), Collections.<Frame>emptyList());
        Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);
        EndPointAnalysis analysis = analyzer.locateEndPoint(trace);
        assertNotNull("No analysis result", analysis);
        assertEquals("Mismatched example", op.getLabel(), analysis.getExample());
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

        builder.enter(httpOp);
        Frame root = builder.exit();
        when(trace.getRootFrame()).thenReturn(root);
        when(trace.getAppName()).thenReturn(ApplicationName.valueOf("app"));

        EndPointAnalysis analysis = analyzer.locateEndPoint(trace);
        assertNull("Unexpected result: " + analysis, analysis);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

    protected EndPointAnalysis makeEndPoint(Frame frame, int depth) {
        Operation op = frame.getOperation();
        String example = "SAGA: " + op.get(SHORT_CLASS_NAME);
        EndPointName endPointName = EndPointName.valueOf(op.get(CLASS_NAME) + "#" + op.get(METHOD_NAME));

        return new EndPointAnalysis(endPointName, op.getLabel(), example, getOperationScore(op, depth), op);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

        EndPointName endPointName = EndPointName.valueOf(
                handlerOp.get(CLASS_NAME) + "#" + handlerOp.get(METHOD_NAME));


        return new EndPointAnalysis(endPointName, handlerOp.getLabel(),
                getExample(busFrame.getOperation()), getOperationScore(handlerOp, depth), handlerOp);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

    @Override
    protected EndPointAnalysis makeEndPoint(Frame frame, int depth) {
        Operation op = frame.getOperation();
        EndPointName endPointName = EndPointName.valueOf(op);
        String example = EndPointAnalysis.getHttpExampleRequest(frame);
        return new EndPointAnalysis(endPointName, op.getLabel(), example, getOperationScore(op, depth), op);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

    protected EndPointAnalysis makeEndPoint(Frame frame, int depth) {
        Operation op = frame.getOperation();
        String portletName = op.get("name", String.class);
        String endPointLabel = "Portlet: " + portletName;
        String example = portletName + "." + op.get("mode", String.class);
        return new EndPointAnalysis(EndPointName.valueOf(portletName), endPointLabel, example, getOperationScore(op, depth), op);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

    @Override
    protected EndPointAnalysis makeEndPoint(Frame frame, int depth) {
        Operation operation = frame.getOperation();
        EndPointName endPointName = EndPointName.valueOf(operation);
        String example = createExample(operation);
        return new EndPointAnalysis(endPointName, operation.getLabel(), example, getDefaultScore(depth));
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

    @Override
    protected EndPointAnalysis makeEndPoint(Frame dispatchFrame, int depth) {
        Operation op = dispatchFrame.getOperation();
        String label = op.getLabel();
        EndPointName name = EndPointName.valueOf(label.replace('/', '_'));
        return new EndPointAnalysis(name, label, label, getOperationScore(op, depth), op);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.endpoint.EndPointAnalysis

    }

    @Test
    public void testLocateEndPoint() {
        Trace trace = createServletEndPointTrace();
        EndPointAnalysis analysis = analyzer.locateEndPoint(trace);
        assertEquals("Mismatched label", "Servlet: My stuff / servlet", analysis.getResourceLabel());
        assertEquals("Mismatched end point", EndPointName.valueOf("My stuff _ servlet"), analysis.getEndPointName());
        assertEquals("Mismatched example", "GET /path?fuu=bar", analysis.getExample());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.