Package org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1

Examples of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.CorrelatablePropertiesPropertiesDocument


            resourceProperty.add(relationshipDocument);

            /*----------------- MOWS OperationalState props -----------------*/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.CURRENTOPERATIONALSTATE);
            CurrentOperationalStateDocument currentOperationalStateDocument = CurrentOperationalStateDocument.Factory.newInstance();
            currentOperationalStateDocument.addNewCurrentOperationalState();
            resourceProperty.add(currentOperationalStateDocument);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTOPERATIONALSTATETRANSITION);
            LastOperationalStateTransitionDocument lastOperationalStateTransitionDocument = LastOperationalStateTransitionDocument.Factory.newInstance();
            StateTransitionType stateTransitionType = lastOperationalStateTransitionDocument.addNewLastOperationalStateTransition();
View Full Code Here


        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() );
        XmlObject maxResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
        assertTrue( maxResponseTimePropElem instanceof DurationMetric );
        DurationMetric maxResponseTimeMetric = ((DurationMetric)maxResponseTimePropElem);
        assertTrue( "Duration metadata attribute is not set", maxResponseTimeMetric.isSetDuration() );
        XmlObject lastResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
        assertTrue( lastResponseTimePropElem instanceof DurationMetric );
    }
View Full Code Here

        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() );
        XmlObject maxResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
        assertTrue( maxResponseTimePropElem instanceof DurationMetric );
        DurationMetric maxResponseTimeMetric = ((DurationMetric)maxResponseTimePropElem);
        assertTrue( "Duration metadata attribute is not set", maxResponseTimeMetric.isSetDuration() );
        XmlObject lastResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
        assertTrue( lastResponseTimePropElem instanceof DurationMetric );
    }
View Full Code Here

            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);

            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);

            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);
        }
        catch (Exception e)
        {
View Full Code Here

            attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.BLACKBERRY_SERVICE_NAME);
            resourceProperty.add(endpointReferenceDocument);
            resourceProperty.addChangeListener(mowsIdentificationCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.ENDPOINTDESCRIPTIONS);
            EndpointDescriptionsDocument endpointDescriptionsDocument = EndpointDescriptionsDocument.Factory.newInstance();
            EndpointDescriptionsDocument.EndpointDescriptions endpointDescriptions = endpointDescriptionsDocument.addNewEndpointDescriptions();
            endpointDescriptions.addDescription(InteropConstants.SERVICES_URL + "/" + InteropConstants.BLACKBERRY_SERVICE_NAME + "?wsdl");
            resourceProperty.add(endpointDescriptionsDocument);
            resourceProperty.addChangeListener(mowsIdentificationCapability);

            /*----------------- MOWS Metrics props -----------------*/
 
View Full Code Here

            stateTransitionType.setTransitionIdentifier("");
            resourceProperty.add(lastOperationalStateTransitionDocument);

            /*----------------- MOWS EndpointIdentification props -----------------*/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.ENDPOINTREFERENCE);
            EndpointReferenceDocument endpointReferenceDocument = EndpointReferenceDocument.Factory.newInstance();
            EndpointReferenceType endpointReferenceType = endpointReferenceDocument.addNewEndpointReference();//temporary
            AttributedURI attributedURI = endpointReferenceType.addNewAddress();
            attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.BLACKBERRY_SERVICE_NAME);
            resourceProperty.add(endpointReferenceDocument);
            resourceProperty.addChangeListener(mowsIdentificationCapability);

View Full Code Here

        m_url = url;
    }

    protected EndpointReferenceType[] getManageabilityReferences() throws FaultException
    {
        GetManageabilityReferencesDocument requestDoc = GetManageabilityReferencesDocument.Factory.newInstance();
        requestDoc.addNewGetManageabilityReferences();
        XmlObject response = sendRequest( requestDoc, "http://xyz.com/action/GetManageabilityReferences", m_url);
        if ( ! ( response instanceof GetManageabilityReferencesResponseDocument.GetManageabilityReferencesResponse ) )
        {
            throw new FaultException( response.toString() );
        }
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

        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

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.CorrelatablePropertiesPropertiesDocument

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.