Package org.oasis_open.docs.wsn.b_2

Examples of org.oasis_open.docs.wsn.b_2.SubscribeResponse


    public void setAddress(String address) {
        this.address = address;
    }

    public Object getObject() throws Exception {
        CreatePullPoint createPullPoint = new CreatePullPoint();
        if (address != null) {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setNamespaceAware(true);
            Document doc = factory.newDocumentBuilder().newDocument();
            Element el = doc.createElementNS("http://servicemix.apache.org/wsn2005/1.0", "address");
            Text txt = doc.createTextNode(address);
            el.appendChild(txt);
            doc.appendChild(el);
            createPullPoint.getAny().add(el);
        }
        return createPullPoint;
    }
View Full Code Here


            pullPoint.create(createPullPointRequest);
            if (manager != null) {
                pullPoint.setManager(manager);
            }
            pullPoint.register();
            CreatePullPointResponse response = new CreatePullPointResponse();
            response.setPullPoint(createEndpointReference(pullPoint.getAddress()));
            success = true;
            return response;
        } catch (EndpointRegistrationException e) {
            UnableToCreatePullPointFaultType fault = new UnableToCreatePullPointFaultType();
            throw new UnableToCreatePullPointFault("Unable to register new endpoint", fault, e);
View Full Code Here

        setEndpoint(createWSA(WSN_URI + "/" + WSN_SERVICE + "/" + brokerName));
        setResolver(resolveWSA(getEndpoint()));
    }

    public PullPoint createPullPoint() throws JBIException {
        CreatePullPointResponse response = (CreatePullPointResponse) request(
                new org.oasis_open.docs.wsn.b_2.CreatePullPoint());
        return new PullPoint(response.getPullPoint(), getClient());
    }
View Full Code Here

        GetMessagesResponse response = (GetMessagesResponse) request(getMessages);
        return response.getNotificationMessage();
    }

    public void destroy() throws JBIException {
        request(new DestroyPullPoint());
    }
View Full Code Here

                      partName = "DestroyPullPointRequest")
            DestroyPullPoint destroyPullPointRequest) throws ResourceUnknownFault, UnableToDestroyPullPointFault {

        log.debug("Destroy");
        createPullPoint.destroyPullPoint(getAddress());
        return new DestroyPullPointResponse();
    }
View Full Code Here

     * @see org.springframework.beans.factory.FactoryBean#getObject()
     */
    public Object getObject() throws Exception {
        Subscribe subscribe = new Subscribe();
        subscribe.setConsumerReference(AbstractWSAClient.createWSA(consumer));
        subscribe.setFilter(new FilterType());
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            subscribe.getFilter().getAny().add(
                    new JAXBElement<TopicExpressionType>(AbstractSubscription.QNAME_TOPIC_EXPRESSION,
View Full Code Here

    public Subscription subscribe(EndpointReferenceType consumer, String topic,
                                  String xpath, boolean raw) throws JBIException {

        Subscribe subscribeRequest = new Subscribe();
        subscribeRequest.setConsumerReference(consumer);
        subscribeRequest.setFilter(new FilterType());
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            subscribeRequest.getFilter().getAny().add(
                    new JAXBElement<TopicExpressionType>(AbstractSubscription.QNAME_TOPIC_EXPRESSION,
View Full Code Here

        SubscribeResponse response = (SubscribeResponse) request(subscribeRequest);
        return new Subscription(response.getSubscriptionReference(), getClient());
    }

    public List<Object> getCurrentMessage(String topic) throws JBIException {
        GetCurrentMessage getCurrentMessageRequest = new GetCurrentMessage();
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            getCurrentMessageRequest.setTopic(topicExp);
        }
        GetCurrentMessageResponse response = (GetCurrentMessageResponse) request(getCurrentMessageRequest);
        return response.getAny();
    }
View Full Code Here

        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            getCurrentMessageRequest.setTopic(topicExp);
        }
        GetCurrentMessageResponse response = (GetCurrentMessageResponse) request(getCurrentMessageRequest);
        return response.getAny();
    }
View Full Code Here

    public PullPoint(EndpointReferenceType pullPoint, JBIContainer container) throws JBIException, JAXBException {
        super(pullPoint, createJaxbClient(container));
    }

    public List<NotificationMessageHolderType> getMessages(int max) throws JBIException {
        GetMessages getMessages = new GetMessages();
        getMessages.setMaximumNumber(BigInteger.valueOf(max));
        GetMessagesResponse response = (GetMessagesResponse) request(getMessages);
        return response.getNotificationMessage();
    }
View Full Code Here

TOP

Related Classes of org.oasis_open.docs.wsn.b_2.SubscribeResponse

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.