Package org.apache.muse.ws.notification

Examples of org.apache.muse.ws.notification.NotificationProducer


        manager.addListener(this);
               
        //
        // initialize the advertisement topics
        //
        NotificationProducer wsn =
            (NotificationProducer)resource.getCapability(WsnConstants.PRODUCER_URI);
       
        wsn.addTopic(MuwsConstants.ADV_ME_CREATION_TOPIC);
        wsn.addTopic(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC);
       
        //
        // create subscriptions for all event consumer that are going to
        // receive notifications from the above topics
        //
View Full Code Here


       
        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

            Document eprDoc = env.getDocument(fileName);
            Element eprXML = XmlUtils.getFirstElement(eprDoc);
           
            EndpointReference epr = new EndpointReference(eprXML);
           
            NotificationProducer wsn =
                (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI);
           
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_CREATION_TOPIC), null, null);
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC), null, null);
        }
    }
View Full Code Here

        Filter filter = pullPointCap.getFilter();
       
        //
        // create subscription that will send messages to the pullpoint
        //
        NotificationProducer wsn = (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI);
        WsResource sub = null;
       
        try
        {
            sub = wsn.subscribe(epr, filter, null, null);
        }
       
        catch (BaseFault error)
        {
            throw new UnableToCreatePullPointFault(error);
View Full Code Here

     * @return An instance of ChangeNotificationListener.
     *
     */
    public PropertyChangeListener newInstance(QName property, WsResource resource)
    {
        NotificationProducer wsn = (NotificationProducer)resource.getCapability(WsnConstants.PRODUCER_URI);
        return new ChangeNotificationListener(property, wsn);
    }
View Full Code Here

     * @return An instance of ChangeNotificationListener.
     *
     */
    public PropertyChangeListener newInstance(QName property, WsResource resource)
    {
        NotificationProducer wsn = (NotificationProducer)resource.getCapability(WsnConstants.PRODUCER_URI);
        return new ChangeNotificationListener(property, wsn);
    }
View Full Code Here

        manager.addListener(this);
               
        //
        // initialize the advertisement topics
        //
        NotificationProducer wsn =
            (NotificationProducer)resource.getCapability(WsnConstants.PRODUCER_URI);
       
        wsn.addTopic(MuwsConstants.ADV_ME_CREATION_TOPIC);
        wsn.addTopic(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC);
       
        //
        // create subscriptions for all event consumer that are going to
        // receive notifications from the above topics
        //
View Full Code Here

       
        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

            Document eprDoc = env.getDocument(fileName);
            Element eprXML = XmlUtils.getFirstElement(eprDoc);
           
            EndpointReference epr = new EndpointReference(eprXML);
           
            NotificationProducer wsn =
                (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI);
           
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_CREATION_TOPIC), null, null);
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC), null, null);
        }
    }
View Full Code Here

        Filter filter = pullPointCap.getFilter();
       
        //
        // create subscription that will send messages to the pullpoint
        //
        NotificationProducer wsn = (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI);
        WsResource sub = null;
       
        try
        {
            sub = wsn.subscribe(epr, filter, null, null);
        }
       
        catch (BaseFault error)
        {
            throw new UnableToCreatePullPointFault(error);
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.notification.NotificationProducer

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.