Examples of Situation


Examples of org.apache.muse.ws.dm.muws.events.Situation

        address = factory.createComponentAddress(advertiser.getEndpointReference());
        reporter.setAddress(address);
       
        event.setReporter(reporter);
       
        Situation situation = factory.createSituation();
        situation.setCategoryType(situationCategory);
        event.setSituation(situation);

        NotificationProducer wsn = (NotificationProducer)advertiser.getCapability(WsnConstants.PRODUCER_URI);
        wsn.publish(topicName, event.toXML());
    }
View Full Code Here

Examples of org.apache.muse.ws.dm.muws.events.Situation

       
        Element situationXML = XmlUtils.getElement(xml, WefConstants.SITUATION_QNAME);
       
        if (situationXML != null)
        {
            Situation situation = factory.createSituation(situationXML);
            setSituation(situation);
            alreadySeen.add(situationXML);
        }
       
        Element[] children = XmlUtils.getAllElements(xml);
View Full Code Here

Examples of org.apache.muse.ws.dm.muws.events.Situation

        {
            Element reporterXML = reporter.toXML(doc);
            wef.appendChild(reporterXML);
        }

        Situation situation = getSituation();

        if (situation != null)
        {
            Element situationXML = situation.toXML(doc);
            wef.appendChild(situationXML);
        }

        appendExtendedElements(wef);
View Full Code Here

Examples of org.apache.muse.ws.dm.muws.events.Situation

       
        Element situationXML = XmlUtils.getElement(xml, WefConstants.SITUATION_QNAME);
       
        if (situationXML != null)
        {
            Situation situation = factory.createSituation(situationXML);
            setSituation(situation);
            alreadySeen.add(situationXML);
        }
       
        Element[] children = XmlUtils.getAllElements(xml);
View Full Code Here

Examples of org.apache.muse.ws.dm.muws.events.Situation

        {
            Element reporterXML = reporter.toXML(doc);
            wef.appendChild(reporterXML);
        }

        Situation situation = getSituation();

        if (situation != null)
        {
            Element situationXML = situation.toXML(doc);
            wef.appendChild(situationXML);
        }

        appendExtendedElements(wef);
View Full Code Here

Examples of org.apache.muse.ws.dm.muws.events.Situation

        address = factory.createComponentAddress(advertiser.getEndpointReference());
        reporter.setAddress(address);
       
        event.setReporter(reporter);
       
        Situation situation = factory.createSituation();
        situation.setCategoryType(situationCategory);
        event.setSituation(situation);

        NotificationProducer wsn = (NotificationProducer)advertiser.getCapability(WsnConstants.PRODUCER_URI);
        wsn.publish(topicName, event.toXML());
    }
View Full Code Here

Examples of org.apache.ws.muws.v1_0.events.Situation

     * @param event
     * @return ManagementEvent
     */
    private XmlObject buildManagementEvent(XmlObject event)
    {
        Situation situation = new SituationImpl(new CategoryImpl(MuwsConstants.SITUATION_OTHER));
        XmlBeansManagementEvent xme = new XmlBeansManagementEvent(situation);
        ManagementEventDocument mgmtEventDoc = (ManagementEventDocument) ((XmlObjectWrapper) xme).getXmlObject();
        ManagementEventType mgmtEvent = mgmtEventDoc.getManagementEvent();
        XmlBeanUtils.addChildElement(mgmtEvent, event);
        return mgmtEventDoc;
View Full Code Here

Examples of org.apache.ws.muws.v1_0.events.Situation

            if ( operationalStatus == null )
            {
               throw new Exception( "The topic is not set" );
            }

            Situation aSituation = new SituationImpl( new CategoryImpl( MuwsConstants.SITUATION_AVAILABILITY ) );

            if ( firstEvent )
            {
               aSituation.setSeverity( (short) 4 );
               lStringC.setStringValue( "Available disk space is too low" );
               aSituation.setSuccessDisposition( Boolean.FALSE );
               m_correlationId = ((UUID) IdentifierUtils.UUID_VERSION_FOUR_GENERATOR.nextIdentifier()).toString();
            }
            else
            {
               aSituation.setSeverity( (short) 1 );
               lStringC.setStringValue( "Available disk space is OK" );
               aSituation.setSuccessDisposition( Boolean.TRUE );
            }

            LangStringImpl lstring = new LangStringImpl( lStringC );
            aSituation.setMessage( lstring );
            XmlBeansManagementEvent event = new XmlBeansManagementEvent( aSituation );

            // set resource Reporter and source  ResourceId
            ResourcePropertySet propSet      = m_notificationProducerResource.getResourcePropertySet(  );
            ResourceProperty    resourceId   = propSet.get( ApplicationPropertyQNames.RESOURCEID );
View Full Code Here

Examples of org.apache.ws.muws.v1_0.events.Situation

            if ( operationalStatus == null )
            {
               throw new Exception( "The topic is not set" );
            }

            Situation aSituation = new SituationImpl( new CategoryImpl( MuwsConstants.SITUATION_AVAILABILITY ) );

            if ( firstEvent )
            {
               aSituation.setSeverity( (short) 4 );
               lStringC.setStringValue( "Available disk space is too low" );
               aSituation.setSuccessDisposition( Boolean.FALSE );
               m_correlationId = UUID_GEN.generateUuid(  );
            }
            else
            {
               aSituation.setSeverity( (short) 1 );
               lStringC.setStringValue( "Available disk space is OK" );
               aSituation.setSuccessDisposition( Boolean.TRUE );
            }

            LangStringImpl lstring = new LangStringImpl( lStringC );
            aSituation.setMessage( lstring );
            XmlBeansManagementEvent event = new XmlBeansManagementEvent( aSituation );

            // set resource Reporter and source  ResourceId
            ResourcePropertySet propSet      = m_notificationProducerResource.getResourcePropertySet(  );
            ResourceProperty    resourceId   = propSet.get( ApplicationPropertyQNames.RESOURCEID );
View Full Code Here

Examples of org.apache.ws.muws.v1_0.events.Situation

            stateTransitionType.setTransitionIdentifier("urn:NONE");
            stateTransitionType.setTime(currentTime);
            notif.setCurrentTime(currentTime);

            Situation situation = new SituationImpl(new CategoryImpl(MuwsConstants.SITUATION_OTHER));
            XmlBeansManagementEvent xme = new XmlBeansManagementEvent(situation);
            ManagementEventDocument mgmtEvent = (ManagementEventDocument) ((XmlObjectWrapper) xme).getXmlObject();
            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManagementEventType managementEvent = mgmtEvent.getManagementEvent();
            XmlBeanUtils.addChildElement(managementEvent, notifDocument);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.