Package com.springsource.insight.intercept.operation

Examples of com.springsource.insight.intercept.operation.OperationMap


            if (!RestServiceDefinitions.ROOT_PATH.equals(pathDefinition)) {
                final OperationList opList = op.get("pathParams", OperationList.class);
                assertNotNull("Missing path parameters list", opList);
                assertEquals("Unexpected number of path parameters", 1, opList.size());

                final OperationMap opMap = opList.get(0, OperationMap.class);
                assertNotNull("Missing path parameters map", opMap);
                assertEquals("Unexpected number of mapped path parameters", 3, opMap.size());

                final String paramName = opMap.get("name", String.class);
                assertEquals("Mismatched path param name", RestServiceDefinitions.NOW_PARAM_NAME, paramName);

                final Long paramValue = opMap.get("value", Long.class);
                assertNotNull("Missing path parameter value", paramValue);
                assertEquals("Mismatched path parameter value", now, paramValue.longValue());

                final String paramType = opMap.get("type", String.class);
                assertEquals("Mismatched path param type", PathParam.class.getSimpleName(), paramType);

                final JaxrsParamType enumType = JaxrsParamType.fromTypeName(paramType);
                assertEquals("Mismatched path param enum", JaxrsParamType.PATH, enumType);
            }
View Full Code Here


        Operation op = getLastEntered();

        assertEquals("org.axonframework.insight.plugin.axon.CommandHandlerOperationCollectionAspectTest$TestCommand", op.get("commandType"));
        assertEquals("handle", op.getSourceCodeLocation().getMethodName());
        OperationMap map = op.get("metaData", OperationMap.class);
        assertNotNull("CommandMessage metadata missing in operation", map);
        assertEquals(1, map.size());
        assertEquals("someValue", map.get("someKey"));
    }
View Full Code Here

        TimeRange range = trace.getRange();
        int time = TimeUtil.nanosToSeconds(range.getStart());
        MetricsBag mb = MetricsBag.create(resourceKey, range);

        // Add the response size data point
        OperationMap response = op.get("response", OperationMap.class);
        Number contentSize = (response == null) ? null : response.get("contentSize", Number.class);
        if (contentSize != null) {    // OK if missing since collected only if extra information
            DataPoint responseSizePoint = new DataPoint(time, contentSize.doubleValue());
            mb.add(ENDPOINT_RESPONSE_SIZE, PointType.GAUGE);
            mb.add(responseSizePoint, ENDPOINT_RESPONSE_SIZE);
        }

        // Add the request size data point
        OperationMap request = op.get("request", OperationMap.class);
        Number contentLength = (request == null) ? null : request.get("contentLength", Number.class);
        if (contentLength != null) {    // OK if missing since collected only if extra information
            DataPoint requestSizePoint = new DataPoint(time, contentLength.doubleValue());
            mb.add(ENDPOINT_REQUEST_SIZE, PointType.GAUGE);
            mb.add(requestSizePoint, ENDPOINT_REQUEST_SIZE);
        }
View Full Code Here

        Operation op = getLastEntered();

        assertEquals("org.axonframework.insight.plugin.axon.EventHandlerOperationCollectionAspectTest$TestEvent", op.get("eventType"));
        assertEquals("handle", op.getSourceCodeLocation().getMethodName());
        OperationMap map = op.get("metaData", OperationMap.class);
        assertNotNull("EventMessage metadata missing in operation", map);
        assertEquals(1, map.size());
        assertEquals("someValue", map.get("someKey"));
    }
View Full Code Here

TOP

Related Classes of com.springsource.insight.intercept.operation.OperationMap

Copyright © 2018 www.massapicom. 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.