Package org.apache.muse.ws.dm.muws

Examples of org.apache.muse.ws.dm.muws.Metric


            // a property is a metric IF it defines a Capability element in
            // its RMD definition with the Metrics capability URI
            //
            if (capability != null && capability.equals(MuwsConstants.METRICS_URI))
            {
                Metric metric = new SimpleMetric(qname, resource);
                _metricsByQName.put(qname, metric);
               
                //
                // on demand? update metadata before reads
                //
                if (metric.isOnDemand())
                    props.addReadListener(new MetricOnDemandListener(metric));
               
                //
                // add metric attributes for all reads
                //
                props.addReadListener(new MetricDecorationProvider(metric));
               
                //
                // update metadata whenever changes occur
                //
                props.addChangeListener(new MetricUpdateListener(metric));
               
                //
                // special case: counters that run on an interval can be
                // automated by starting a thread that increments the value
                // every N seconds
                //
                if (metric.isCounter() && metric.isInterval())
                {
                    Thread counter = new CounterThread(props, metric);
                    _countersByQName.put(qname, counter);
                    counter.start();
                }
View Full Code Here


            // a property is a metric IF it defines a Capability element in
            // its RMD definition with the Metrics capability URI
            //
            if (capability != null && capability.equals(MuwsConstants.METRICS_URI))
            {
                Metric metric = new SimpleMetric(qname, resource);
                _metricsByQName.put(qname, metric);
               
                //
                // on demand? update metadata before reads
                //
                if (metric.isOnDemand())
                    props.addReadListener(new MetricOnDemandListener(metric));
               
                //
                // add metric attributes for all reads
                //
                props.addReadListener(new MetricDecorationProvider(metric));
               
                //
                // update metadata whenever changes occur
                //
                props.addChangeListener(new MetricUpdateListener(metric));
               
                //
                // special case: counters that run on an interval can be
                // automated by starting a thread that increments the value
                // every N seconds
                //
                if (metric.isCounter() && metric.isInterval())
                {
                    Thread counter = new CounterThread(props, metric);
                    _countersByQName.put(qname, counter);
                    counter.start();
                }
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.dm.muws.Metric

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.