Package com.springsource.insight.util.props

Examples of com.springsource.insight.util.props.NamedPropertySource


    private EndPointAnalysis assertEndPointAnalysis(Operation op, int depth) {
        EndPointAnalysis analysis = analyzer.makeEndPoint(createMockOperationWrapperFrame(op), depth);
        assertNotNull("No analysis", analysis);
        assertSame("Mismatched source operation", op, analysis.getSourceOperation());

        NamedPropertySource props = JmxInvocationEndPointAnalyzer.toPropertySource(op);
        EndPointName name = analysis.getEndPointName();
        assertEquals("Mismatched endpoint",
                PropertiesUtil.format(analyzer.getSettingFormat(JmxInvocationEndPointAnalyzer.ENDPOINT_FORMAT), props),
                name.getName());
        assertEquals("Mismatched label",
View Full Code Here


    }

    @Override
    protected EndPointAnalysis makeEndPoint(Frame frame, int depth) {
        Operation operation = frame.getOperation();
        NamedPropertySource props = toPropertySource(operation);
        String endpointName = PropertiesUtil.format(getSettingFormat(ENDPOINT_FORMAT), props);
        return new EndPointAnalysis(EndPointName.valueOf(endpointName),
                PropertiesUtil.format(getSettingFormat(LABEL_FORMAT), props),
                PropertiesUtil.format(getSettingFormat(EXAMPLE_FORMAT), props),
                getOperationScore(operation, depth),
View Full Code Here

    public static final NamedPropertySource toPropertySource(final Operation op) {
        if (op == null) {
            return PropertiesUtil.EMPTY_SOURCE;
        }

        NamedPropertySource opProps = OperationUtils.toPropertySource(op);
        String beanName = op.get(JmxPluginRuntimeDescriptor.BEAN_NAME_PROP, String.class);
        if (StringUtil.isEmpty(beanName)) {
            return opProps;
        }

        try {
            NamedPropertySource beanProps = ResourceKey.toPropertySource(beanName);
            // NOTE: order is important - especially for the 'type' property
            return new AggregateNamedPropertySource(beanProps, opProps);
        } catch (MalformedObjectNameException e) {
            InsightLogger logger = InsightLogManager.getLogger(JmxInvocationEndPointAnalyzer.class.getName());
            logger.warning("Failed (" + e.getClass().getSimpleName() + ")"
View Full Code Here

TOP

Related Classes of com.springsource.insight.util.props.NamedPropertySource

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.