Examples of TraitFactory


Examples of org.drools.factmodel.traits.TraitFactory

    }



    protected <T, K> T applyTrait( K core, Class<T> trait, Object value, boolean logical ) throws LogicalTypeInconsistencyException {
        TraitFactory builder = TraitFactory.getTraitBuilderForKnowledgeBase( this.getKnowledgeRuntime().getKnowledgeBase() );

        TraitableBean inner = makeTraitable( core, builder, logical );

        boolean needsProxy = trait.isAssignableFrom( inner.getClass() );
        boolean hasTrait = inner.hasTrait( trait.getName() );
View Full Code Here

Examples of org.rhq.plugins.perftest.trait.TraitFactory

         *
         * jdobies, Jun 25, 2007
         */
        MeasurementFactory measurementFactory = scenarioManager.getMeasurementFactory(resourceTypeName);
        CalltimeFactory calltimeFactory = scenarioManager.getCalltimeFactory(resourceTypeName);
        TraitFactory traitFactory = scenarioManager.getTraitFactory(resourceTypeName);

        for (MeasurementScheduleRequest metric : metrics) {
            switch (metric.getDataType()) {
                case CALLTIME:
                    CallTimeData callTimeData = calltimeFactory.nextValue(metric);
                    if (callTimeData!=null) {
                        report.addData(callTimeData);
                    }
                    break;
                case MEASUREMENT:
                    MeasurementDataNumeric measurementData = (MeasurementDataNumeric) measurementFactory.nextValue(metric);

                    if (measurementData != null) {
                        report.addData(measurementData);
                    }
                    break;
                case TRAIT:
                    MeasurementDataTrait measurementDataTrait = traitFactory.nextValue(metric);
                    if (measurementDataTrait != null) {
                        report.addData(measurementDataTrait);
                    }
                    break;

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.