Package org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows

Examples of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric


        assertContainsURI( capabilityElems, MetricsCapability.URI );
        XmlObject currentTimePropElem = getSingleProperty( m_resource, org.apache.ws.muws.v1_0.capability.MetricsCapability.PROP_NAME_CURRENT_TIME );
        assertTrue( currentTimePropElem instanceof XmlDateTime );
        XmlObject numRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_REQUESTS );
        assertTrue( numRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numRequestsMetric = ((IntegerCounter)numRequestsPropElem);
        long numRequests = numRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numRequestsMetric.isSetDuration() );
        XmlObject numFailedRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_FAILED_REQUESTS );
        assertTrue( numFailedRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numFailedRequestsMetric = ((IntegerCounter)numFailedRequestsPropElem);
        long numFailedRequests = numFailedRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numFailedRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numFailedRequestsMetric.isSetDuration() );
        XmlObject numSuccessfulRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_SUCCESSFUL_REQUESTS );
        assertTrue( numSuccessfulRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numSuccessfulRequestsMetric = ((IntegerCounter)numSuccessfulRequestsPropElem);
        long numSuccessfulRequests = numSuccessfulRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
View Full Code Here


        assertContainsURI( capabilityElems, MetricsCapability.URI );
        XmlObject currentTimePropElem = getSingleProperty( m_resource, org.apache.ws.muws.v1_0.capability.MetricsCapability.PROP_NAME_CURRENT_TIME );
        assertTrue( currentTimePropElem instanceof XmlDateTime );
        XmlObject numRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_REQUESTS );
        assertTrue( numRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numRequestsMetric = ((IntegerCounter)numRequestsPropElem);
        long numRequests = numRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numRequestsMetric.isSetDuration() );
        XmlObject numFailedRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_FAILED_REQUESTS );
        assertTrue( numFailedRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numFailedRequestsMetric = ((IntegerCounter)numFailedRequestsPropElem);
        long numFailedRequests = numFailedRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numFailedRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numFailedRequestsMetric.isSetDuration() );
        XmlObject numSuccessfulRequestsPropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_NUMBER_OF_SUCCESSFUL_REQUESTS );
        assertTrue( numSuccessfulRequestsPropElem instanceof IntegerCounter );
        IntegerCounter numSuccessfulRequestsMetric = ((IntegerCounter)numSuccessfulRequestsPropElem);
        long numSuccessfulRequests = numSuccessfulRequestsMetric.getBigIntegerValue().longValue();
        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
View Full Code Here

            Calendar resetAt = Calendar.getInstance();

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.NUMBEROFREQUESTS);
            NumberOfRequestsDocument numberOfRequestsDocument = NumberOfRequestsDocument.Factory.newInstance();
            IntegerCounter integerCounter = numberOfRequestsDocument.addNewNumberOfRequests();
            integerCounter.setBigIntegerValue(BigInteger.valueOf(120L));
            integerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.NUMBEROFSUCCESSFULREQUESTS);
            NumberOfSuccessfulRequestsDocument numberOfSuccessfulRequestsDocument = NumberOfSuccessfulRequestsDocument.Factory.newInstance();
            IntegerCounter successIntegerCounter = numberOfSuccessfulRequestsDocument.addNewNumberOfSuccessfulRequests();
            successIntegerCounter.setBigIntegerValue(BigInteger.valueOf(90L));
            successIntegerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfSuccessfulRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.NUMBEROFFAILEDREQUESTS);
            NumberOfFailedRequestsDocument numberOfFailedRequestsDocument = NumberOfFailedRequestsDocument.Factory.newInstance();
            IntegerCounter failedIntegerCounter = numberOfFailedRequestsDocument.addNewNumberOfFailedRequests();
            failedIntegerCounter.setBigIntegerValue(BigInteger.valueOf(30L));
            failedIntegerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfFailedRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.SERVICETIME);
            ServiceTimeDocument serviceTimeDocument = ServiceTimeDocument.Factory.newInstance();
View Full Code Here

            CurrentOperationalStateDocument currentOperationalStateDocument = CurrentOperationalStateDocument.Factory.newInstance();
            currentOperationalStateDocument.addNewCurrentOperationalState();
            resourceProperty.add(currentOperationalStateDocument);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTOPERATIONALSTATETRANSITION);
            LastOperationalStateTransitionDocument lastOperationalStateTransitionDocument = LastOperationalStateTransitionDocument.Factory.newInstance();
            StateTransitionType stateTransitionType = lastOperationalStateTransitionDocument.addNewLastOperationalStateTransition();
            stateTransitionType.addNewEnteredState();
            stateTransitionType.addNewPreviousState();
            stateTransitionType.setTime(Calendar.getInstance());
            stateTransitionType.setTransitionIdentifier("");
            resourceProperty.add(lastOperationalStateTransitionDocument);
View Full Code Here

            maxRespDurationMetric.setDuration(builder.toGDuration());
            resourceProperty.add(maxResponseTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTRESPONSETIME);
            LastResponseTimeDocument lastResponseTimeDocument = LastResponseTimeDocument.Factory.newInstance();
            DurationMetric lastRespDurationMetric = lastResponseTimeDocument.addNewLastResponseTime();
            lastRespDurationMetric.setGDurationValue(builder.toGDuration());
            lastRespDurationMetric.setDuration(builder.toGDuration());
            resourceProperty.add(lastResponseTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);
        }
View Full Code Here

            serviceTimeMetric.setDuration(builder.toGDuration());
            resourceProperty.add(serviceTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.MAXRESPONSETIME);
            MaxResponseTimeDocument maxResponseTimeDocument = MaxResponseTimeDocument.Factory.newInstance();
            DurationMetric maxRespDurationMetric = maxResponseTimeDocument.addNewMaxResponseTime();
            maxRespDurationMetric.setGDurationValue(builder.toGDuration());
            maxRespDurationMetric.setDuration(builder.toGDuration());
            resourceProperty.add(maxResponseTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);
View Full Code Here

            successIntegerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfSuccessfulRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.NUMBEROFFAILEDREQUESTS);
            NumberOfFailedRequestsDocument numberOfFailedRequestsDocument = NumberOfFailedRequestsDocument.Factory.newInstance();
            IntegerCounter failedIntegerCounter = numberOfFailedRequestsDocument.addNewNumberOfFailedRequests();
            failedIntegerCounter.setBigIntegerValue(BigInteger.valueOf(30L));
            failedIntegerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfFailedRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);
View Full Code Here

            /*----------------- MOWS Metrics props -----------------*/

            Calendar resetAt = Calendar.getInstance();

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.NUMBEROFREQUESTS);
            NumberOfRequestsDocument numberOfRequestsDocument = NumberOfRequestsDocument.Factory.newInstance();
            IntegerCounter integerCounter = numberOfRequestsDocument.addNewNumberOfRequests();
            integerCounter.setBigIntegerValue(BigInteger.valueOf(120L));
            integerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

View Full Code Here

            integerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.NUMBEROFSUCCESSFULREQUESTS);
            NumberOfSuccessfulRequestsDocument numberOfSuccessfulRequestsDocument = NumberOfSuccessfulRequestsDocument.Factory.newInstance();
            IntegerCounter successIntegerCounter = numberOfSuccessfulRequestsDocument.addNewNumberOfSuccessfulRequests();
            successIntegerCounter.setBigIntegerValue(BigInteger.valueOf(90L));
            successIntegerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfSuccessfulRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);
View Full Code Here

            failedIntegerCounter.setResetAt(resetAt);
            resourceProperty.add(numberOfFailedRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.SERVICETIME);
            ServiceTimeDocument serviceTimeDocument = ServiceTimeDocument.Factory.newInstance();
            DurationMetric serviceTimeMetric = serviceTimeDocument.addNewServiceTime();
            GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5, 6, new BigDecimal("0.789"));
            serviceTimeMetric.setGDurationValue(builder.toGDuration());
            serviceTimeMetric.setDuration(builder.toGDuration());
            resourceProperty.add(serviceTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric

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.