Package org.activemq.ws.xmlbeans.notification.base

Examples of org.activemq.ws.xmlbeans.notification.base.NotifyDocument


        };

        addSubscription(broker);
        sendNotification(broker);

        NotifyDocument subNotifyDoc = (NotifyDocument) service.getResult().poll(2000);
        System.out.println("Got Notify: "+subNotifyDoc);
       
        assertValidMessage(subNotifyDoc);
    }
View Full Code Here


        ActiveMQConnection connection = broker.getConnection();
        Session session = connection.createSession(false, 0);
        ActiveMQTopic topic = new ActiveMQTopic("Test");
        MessageConsumer consumer = session.createConsumer(topic);
       
        NotifyDocument request = NotifyDocument.Factory.newInstance();
        Notify notify = request.addNewNotify();
        NotificationMessageHolderType messageHolder = notify.addNewNotificationMessage();
        messageHolder.setTopic( TopicExpressionConverter.toTopicExpression(topic) );
        XmlObject o = createMessage();
        messageHolder.setMessage(o);
       
View Full Code Here

        };

        addSubscription(broker);
        sendNotification(broker);

        NotifyDocument subNotifyDoc = (NotifyDocument) result.poll(2000);
        System.out.println("Got Notify: "+subNotifyDoc);

        assertValidMessage(subNotifyDoc);
    }
View Full Code Here

        EndpointReferenceType subRef = addSubscription(broker);
       
        // The sub should be running and we should be getting notifed now.
        sendNotification(broker);
        NotifyDocument subNotifyDoc = (NotifyDocument) result.poll(2000);
        assertNotNull(subNotifyDoc);
       
        // Pause the subscription.
        PauseSubscriptionDocument pauseRequest = PauseSubscriptionDocument.Factory.newInstance();
        pauseRequest.addNewPauseSubscription();
View Full Code Here

        return subresponse.getSubscribeResponse().getSubscriptionReference();
    }
   
    protected void sendNotification(ActiveMQNotificationBroker broker) {
        // START SNIPPET: notify
        NotifyDocument request = NotifyDocument.Factory.newInstance();
        NotifyDocument.Notify notify = request.addNewNotify();
        NotificationMessageHolderType messageHolder = notify.addNewNotificationMessage();
        messageHolder.setTopic( TopicExpressionConverter.toTopicExpression(topic) );

        // create some XMLBean for the payload
        XmlObject o = createMessage();
View Full Code Here

        notificationConsumer = consumer;
       
    }

    private void dispatch(TopicExpressionType topic, XmlObject xml) {
        NotifyDocument request = NotifyDocument.Factory.newInstance();
        Notify notify = request.addNewNotify();
        NotificationMessageHolderType messageHolder = notify.addNewNotificationMessage();
        if( producerReference!=null )
            messageHolder.setProducerReference((EndpointReferenceType) producerReference.copy());
        messageHolder.setTopic(topic);
        messageHolder.setMessage(xml);
View Full Code Here

TOP

Related Classes of org.activemq.ws.xmlbeans.notification.base.NotifyDocument

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.