Package org.oasis_open.docs.wsn.b_2

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


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


        throws TopicNotSupportedFault, TopicExpressionDialectUnknownFault, MultipleTopicsSpecifiedFault,
        InvalidTopicExpressionFault, ResourceUnknownFault, NoCurrentMessageOnTopicFault {
        //CHECKSTYLE:ON
        GetCurrentMessage getCurrentMessageRequest = new GetCurrentMessage();
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            getCurrentMessageRequest.setTopic(topicExp);
        }
        GetCurrentMessageResponse response = broker.getCurrentMessage(getCurrentMessageRequest);
        return response.getAny();
    }
View Full Code Here

        RegisterPublisher registerPublisherRequest = new RegisterPublisher();
        registerPublisherRequest.setPublisherReference(publisher.getEpr());
        if (topics != null) {
            for (String topic : topics) {
                TopicExpressionType topicExp = new TopicExpressionType();
                topicExp.getContent().add(topic);
                registerPublisherRequest.getTopic().add(topicExp);
            }
        }
        registerPublisherRequest.setDemand(demand);
        RegisterPublisherResponse response = broker.registerPublisher(registerPublisherRequest);
View Full Code Here

    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, TopicExpressionType.class, topicExp));
        }
        if (xpath != null) {
            QueryExpressionType xpathExp = new QueryExpressionType();
            xpathExp.setDialect(AbstractSubscription.XPATH1_URI);
View Full Code Here

     */
    public Object getObject() throws Exception {
        RegisterPublisher registerPublisher = new RegisterPublisher();
        registerPublisher.setPublisherReference(AbstractWSAClient.createWSA(publisher));
        if (topic != null) {
            TopicExpressionType topicExp = new TopicExpressionType();
            topicExp.getContent().add(topic);
            registerPublisher.getTopic().add(topicExp);
        }
        registerPublisher.setDemand(new Boolean(demand));
        return registerPublisher;
    }
View Full Code Here

    public TopicExpressionType toTopicExpression(ActiveMQTopic topic) {
        return toTopicExpression(topic.getPhysicalName());
    }

    public TopicExpressionType toTopicExpression(String name) {
        TopicExpressionType answer = new TopicExpressionType();
        answer.getContent().add(QName.valueOf(name));
        answer.setDialect(SIMPLE_DIALECT);
        return answer;
    }
View Full Code Here

  public void notify(String topic, Object msg) throws JBIException {
    Notify notify = new Notify();
    NotificationMessageHolderType holder = new NotificationMessageHolderType();
    if (topic != null) {
      TopicExpressionType topicExp = new TopicExpressionType();
      topicExp.getContent().add(topic);
      holder.setTopic(topicExp);
    }
    holder.setMessage(new NotificationMessageHolderType.Message());
    holder.getMessage().setAny(msg);
    notify.getNotificationMessage().add(holder);
View Full Code Here

   
    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, TopicExpressionType.class, topicExp));
    }
    if (xpath != null) {
      QueryExpressionType xpathExp = new QueryExpressionType();
      xpathExp.setDialect(AbstractSubscription.XPATH1_URI);
View Full Code Here

  }

  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

                     boolean demand) throws JBIException {
   
    RegisterPublisher registerPublisherRequest = new RegisterPublisher();
    registerPublisherRequest.setPublisherReference(publisherReference);
    if (topic != null) {
      TopicExpressionType topicExp = new TopicExpressionType();
      topicExp.getContent().add(topic);
      registerPublisherRequest.getTopic().add(topicExp);
    }
    registerPublisherRequest.setDemand(Boolean.valueOf(demand));
    RegisterPublisherResponse response = (RegisterPublisherResponse) request(registerPublisherRequest);
    return new Publisher(response.getPublisherRegistrationReference(), getClient());
View Full Code Here

TOP

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

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.