Package org.oasisOpen.docs.wsdm.x2004.x04.muws05.schema

Examples of org.oasisOpen.docs.wsdm.x2004.x04.muws05.schema.IntegerMetric


            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

     * @return Source EPR
     */
    private EndpointReferenceType parseSourceEpr(ManagementEventTypeImpl manEvt)
    {
        ComponentType sourceComponent = manEvt.getSourceComponent();
        ComponentAddressType sourceCompAddr = sourceComponent.getComponentAddressArray(0);
        EndpointReferenceType sourceEpr =
                (EndpointReferenceType) XmlBeanUtils.getChildElements(sourceCompAddr)[0];
        return sourceEpr;
    }
View Full Code Here

     * @param manEvt
     * @return Source EPR
     */
    private EndpointReferenceType parseSourceEpr(ManagementEventTypeImpl manEvt)
    {
        ComponentType sourceComponent = manEvt.getSourceComponent();
        ComponentAddressType sourceCompAddr = sourceComponent.getComponentAddressArray(0);
        EndpointReferenceType sourceEpr =
                (EndpointReferenceType) XmlBeanUtils.getChildElements(sourceCompAddr)[0];
        return sourceEpr;
    }
View Full Code Here

            operationalStatusDocument.setOperationalStatus(OperationalStatusDocument.OperationalStatus.AVAILABLE);
            resourceProperty.add(operationalStatusDocument);
            resourceProperty.addChangeListener(operationalStatusCapability);//add for management events

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.CORRELATABLEPROPERTIES);
            CorrelatablePropertiesDocument correlatablePropertiesDocument = CorrelatablePropertiesDocument.Factory.newInstance();
            CorrelatablePropertiesType correlatablePropertiesType = correlatablePropertiesDocument.addNewCorrelatableProperties();
            correlatablePropertiesType.setDialect(MuwsConstants.PBM_DIALECT);
            correlatablePropertiesType.setNegativeAssertionPossible(false);
            MatchDocument matchDocument = MatchDocument.Factory.newInstance();
            matchDocument.setMatch(WeatherstationPropertyQNames.FCCID);
            XmlBeanUtils.addChildElement(correlatablePropertiesType, matchDocument);
View Full Code Here

    {
        XmlObject[] capabilityElems = m_resource.getResourceProperty( ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
        assertContainsURI( capabilityElems, CorrelatablePropertiesCapability.URI );
        XmlObject correlatablePropertiesPropElem = getSingleProperty( m_resource, CorrelatablePropertiesCapability.PROP_NAME_CORRELATABLE_PROPERTIES );
        assertTrue( correlatablePropertiesPropElem instanceof CorrelatablePropertiesType );
        CorrelatablePropertiesType correlatableProperties = (CorrelatablePropertiesType)correlatablePropertiesPropElem;
        assertEquals( "Incorrect dialect", MuwsConstants.PBM_DIALECT, correlatableProperties.getDialect() );
        XmlObject[] matchElems = XmlBeanUtils.getChildElements( correlatableProperties, new QName( MuwsConstants.NSURI_PBM, "Match", MuwsConstants.NSPREFIX_PBM ) );
        assertEquals( "muws-p1-xs:CorrelatableProperties element does not contain exactly one pbm:Match element.", 1, matchElems.length );
        assertTrue( matchElems[0] instanceof XmlQName );
        XmlQName match = (XmlQName) matchElems[0];
        assertEquals( WeatherstationPropertyQNames.FCCID, match.getQNameValue() );
View Full Code Here

            resourceProperty.add(operationalStatusDocument);
            resourceProperty.addChangeListener(operationalStatusCapability);//add for management events

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.CORRELATABLEPROPERTIES);
            CorrelatablePropertiesDocument correlatablePropertiesDocument = CorrelatablePropertiesDocument.Factory.newInstance();
            CorrelatablePropertiesType correlatablePropertiesType = correlatablePropertiesDocument.addNewCorrelatableProperties();
            correlatablePropertiesType.setDialect(MuwsConstants.PBM_DIALECT);
            correlatablePropertiesType.setNegativeAssertionPossible(false);
            MatchDocument matchDocument = MatchDocument.Factory.newInstance();
            matchDocument.setMatch(WeatherstationPropertyQNames.FCCID);
            XmlBeanUtils.addChildElement(correlatablePropertiesType, matchDocument);
            resourceProperty.add(correlatablePropertiesDocument);
            resourceProperty.addChangeListener(correlatablePropertiesCapability);//add for management events
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x04.muws05.schema.IntegerMetric

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.