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

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


        PortListen notifListener = new PortListen( NOTIF_LISTENER_PORT, NOTIF_LISTENER_TIMEOUT );

        m_service.getCurrentTemperature();

        ManagementEventType mgmtEvent = waitForManagementEvent( notifListener );
        if ( DEBUG ) { System.out.println( "Received ManagementEvent:\n" + mgmtEvent.xmlText( new XmlOptions().setSaveOuter().setSavePrettyPrint() ) ); }

        XmlObject[] requestProcessingNotifElems = XmlBeanUtils.getChildElements(mgmtEvent, new QName(MowsConstants.NSURI_MOWS_SCHEMA, "RequestProcessingNotification", MowsConstants.NSPREFIX_MOWS_SCHEMA));
        assertEquals( 1, requestProcessingNotifElems.length );
        assertTrue( requestProcessingNotifElems[0] instanceof RequestProcessingNotificationDocument.RequestProcessingNotification );
        RequestProcessingNotificationDocument.RequestProcessingNotification requestProcessingNotif = (RequestProcessingNotificationDocument.RequestProcessingNotification) requestProcessingNotifElems[0];
View Full Code Here


        TotalCodeModuleSizeDocument totalCodeModuleSizeDocument = TotalCodeModuleSizeDocument.Factory.newInstance();
        totalCodeModuleSizeDocument.setTotalCodeModuleSize( 1111 );
        setSingleProperty( m_resource, totalCodeModuleSizeDocument );

        ManagementEventType mgmtEvent = waitForManagementEvent( notifListener );

        XmlObject propChangedEvent = XmlBeanUtils.getChildElements(mgmtEvent, new QName(ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "ResourcePropertyValueChangeNotification"))[0];
        assertNotNull("ManagementEvent does not contain a ResourcePropertyValueChangeNotification", propChangedEvent);
    }
View Full Code Here

        TotalCodeModuleSizeDocument totalCodeModuleSizeDocument = TotalCodeModuleSizeDocument.Factory.newInstance();
        totalCodeModuleSizeDocument.setTotalCodeModuleSize( 9999 );
        setSingleProperty( m_resource, totalCodeModuleSizeDocument );

        ManagementEventType mgmtEvent = waitForManagementEvent( notifListener );

        XmlObject propChangedEvent = XmlBeanUtils.getChildElements(mgmtEvent, new QName(ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "ResourcePropertyValueChangeNotification"))[0];
        assertNotNull("ManagementEvent does not contain a ResourcePropertyValueChangeNotification", propChangedEvent);
    }
View Full Code Here

        // change status to Unavailable
        operationalStatusDoc.setOperationalStatus( OperationalStatusDocument.OperationalStatus.UNAVAILABLE );
        setSingleProperty( m_resource, operationalStatusDoc );

        // make sure we receive a propChanged mgmtEvent
        ManagementEventType mgmtEvent = waitForManagementEvent( notifListener );
        XmlObject[] propChangedEvents = XmlBeanUtils.getChildElements(mgmtEvent, new QName(ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "ResourcePropertyValueChangeNotification"));
        assertEquals( "ManagementEvent does not contain a single ResourcePropertyValueChangeNotification", 1, propChangedEvents.length );
        assertTrue( propChangedEvents[0] instanceof ResourcePropertyValueChangeNotificationType );
        ResourcePropertyValueChangeNotificationType propChangedEvent = (ResourcePropertyValueChangeNotificationType)propChangedEvents[0];
        assertFalse( propChangedEvent.getNewValue().toString().equals( propChangedEvent.getOldValue().toString() ) );
View Full Code Here

            manageabilityCapabilityDocument.setManageabilityCapability(ManageabilityReferencesCapability.URI);
            resourceProperty.add(manageabilityCapabilityDocument);

            /** Properties **/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.RESOURCEID);
            ResourceIdDocument resourceIdDocument = ResourceIdDocument.Factory.newInstance();
            resourceIdDocument.setResourceId("urn:" + (String) getID());
            resourceProperty.add(resourceIdDocument);
            resourceProperty.addChangeListener(identityCapability);//add for management events

            //current time is done like in Apollo
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.CURRENTTIME);
View Full Code Here

            manageabilityCapabilityDocument.setManageabilityCapability(IpmiserverPropertyQNames.ATTENTIONLEDON.getNamespaceURI() + "/ServerAlertStatus");
            resourceProperty.add(manageabilityCapabilityDocument);

            /*===== Properties =====*/
            resourceProperty = resourcePropertySet.get(IpmiserverPropertyQNames.RESOURCEID);
            ResourceIdDocument resourceIdDocument = ResourceIdDocument.Factory.newInstance();
            resourceIdDocument.setResourceId("urn:" + (String) getID());
            resourceProperty.add(resourceIdDocument);

            // CurrentTime is done like in Apollo
            resourceProperty = resourcePropertySet.get(IpmiserverPropertyQNames.CURRENTTIME);
            CurrentTimeDocument currentTimeDocument = CurrentTimeDocument.Factory.newInstance();
View Full Code Here

            getTopicSpaceSet().addTopicSpace(bbryTopicSpace);
            bbryTopicSpace.addTopic(codeModuleSize);

            /** Properties **/
            resourceProperty = resourcePropertySet.get(BlackberryPropertyQNames.RESOURCEID);
            ResourceIdDocument resourceIdDocument = ResourceIdDocument.Factory.newInstance();
            resourceIdDocument.setResourceId("urn:" + (String) getID());
            resourceProperty.add(resourceIdDocument);

            resourceProperty = resourcePropertySet.get(BlackberryPropertyQNames.ALLOCATEDSTORAGE);
            AllocatedStorageDocument allocatedStorageDocument = AllocatedStorageDocument.Factory.newInstance();
            allocatedStorageDocument.setAllocatedStorage(1024);
View Full Code Here

    messageText=hackAddNameSpace(messageText);
    System.out.println("Message Ends.");
    messagesJPanel1.setMessage(new WcmMessage(messageText, "","N"));
    try {
      NotificationMessageHolderType noteMess = getNotificationMessageHolder(messageText);     
      ManagementEventTypeImpl manEvt = parseManagementEvent(noteMess);       
      String optStatus = parseCurrentOperationalStatus(manEvt);
      EndpointReferenceType epr = parseSourceEpr(noteMess) ;
      //if(epr)
      System.out.println(""+epr.getAddress()+" Reports "+optStatus);
      updateStatusOfWs(epr,optStatus);
View Full Code Here

    private ManagementEventTypeImpl parseManagementEvent(NotificationMessageHolderType noteMess)
            throws XmlException
    {
    
        XmlAnyTypeImpl mess = (XmlAnyTypeImpl) noteMess.getMessage();
        ManagementEventTypeImpl manEvt =
                (ManagementEventTypeImpl) XmlBeanUtils.getChildElements(mess)[0];
        return manEvt;
    }
View Full Code Here

      if(arryStuff.length==0)
        return "Black";
      NotifyDocument.Notify ele = (NotifyDocument.Notify) arryStuff[0];
      NotificationMessageHolderType noteMess = ele.getNotificationMessageArray(0);
      XmlAnyTypeImpl mess = (XmlAnyTypeImpl)noteMess.getMessage();
      ManagementEventTypeImpl manEvt = (ManagementEventTypeImpl)XmlBeanUtils.getChildElements(mess)[0];
      //manEvt.get
      ResourcePropertyValueChangeNotificationTypeImpl propChngEvt = (ResourcePropertyValueChangeNotificationTypeImpl)XmlBeanUtils.getChildElements(manEvt)[0];
      NewValue newValue = propChngEvt.getNewValue();
//      XmlObject complience = (XmlObject)XmlBeanUtils.getChildElements(newValue)[0];
     
View Full Code Here

TOP

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

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.