Package org.hornetq.rest.topic

Examples of org.hornetq.rest.topic.PushTopicRegistration


      System.out.println("push subscriptions: " + pushSubscriptions);

      String sub1 = generateURL("/subscribers/1");
      String sub2 = generateURL("/subscribers/2");

      PushTopicRegistration reg = new PushTopicRegistration();
      reg.setDurable(true);
      XmlLink target = new XmlLink();
      target.setHref(sub1);
      reg.setTarget(target);
      response = pushSubscriptions.request().body("application/xml", reg).post();
      Assert.assertEquals(201, response.getStatus());

      reg = new PushTopicRegistration();
      reg.setDurable(true);
      target = new XmlLink();
      target.setHref(sub2);
      reg.setTarget(target);
      response = pushSubscriptions.request().body("application/xml", reg).post();
      Assert.assertEquals(201, response.getStatus());

      shutdown();
      startup();
View Full Code Here


      Assert.assertEquals(200, response.getStatus());
      Link consumers = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "pull-consumers");
      response = consumers.request().formParameter("autoAck", "true").post();
      Link consumeNext = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next");

      PushTopicRegistration reg = new PushTopicRegistration();
      reg.setDurable(false);
      XmlLink target = new XmlLink();
      target.setHref(generateURL("/queues/forwardQueue"));
      target.setRelationship("destination");
      reg.setTarget(target);
      response = pushSubscriptions.request().body("application/xml", reg).post();
      Assert.assertEquals(201, response.getStatus());
      Link pushSubscription = response.getLocation();

      ClientResponse res = sender.request().body("text/plain", Integer.toString(1)).post();
View Full Code Here

      Assert.assertEquals(200, response.getStatus());
      Link consumers = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "pull-consumers");
      response = consumers.request().formParameter("autoAck", "true").post();
      Link consumeNext = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next");

      PushTopicRegistration reg = new PushTopicRegistration();
      reg.setDurable(false);
      XmlLink target = new XmlLink();
      target.setHref(generateURL("/queues/forwardQueue"));
      target.setClassName(HornetQPushStrategy.class.getName());
      reg.setTarget(target);
      response = pushSubscriptions.request().body("application/xml", reg).post();
      Assert.assertEquals(201, response.getStatus());
      Link pushSubscription = response.getLocation();

      ClientResponse res = sender.request().body("text/plain", Integer.toString(1)).post();
View Full Code Here

      Link consumers = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "pull-consumers");
      Link createWithId = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create-with-id");
      response = consumers.request().formParameter("autoAck", "true").post();
      Link consumeNext = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "consume-next");

      PushTopicRegistration reg = new PushTopicRegistration();
      reg.setDurable(false);
      XmlLink target = new XmlLink();
      target.setRelationship("template");
      target.setHref(createWithId.getHref());
      reg.setTarget(target);
      response = pushSubscriptions.request().body("application/xml", reg).post();
      Assert.assertEquals(201, response.getStatus());
      Link pushSubscription = response.getLocation();

      ClientResponse res = sender.request().body("text/plain", Integer.toString(1)).post();
View Full Code Here

      Link sender = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create");
      System.out.println("create: " + sender);
      Link pushSubscriptions = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "push-subscriptions");
      System.out.println("push subscriptions: " + pushSubscriptions);

      PushTopicRegistration reg = new PushTopicRegistration();
      reg.setDurable(false);
      XmlLink target = new XmlLink();
      target.setMethod("put");
      target.setHref(generateURL("/my"));
      reg.setTarget(target);
      response = pushSubscriptions.request().body("application/xml", reg).post();
      Assert.assertEquals(201, response.getStatus());
      Link pushSubscription = response.getLocation();

      ClientResponse res = sender.request().body("text/plain", Integer.toString(1)).post();
View Full Code Here

      ClientResponse response = request.head();
      Assert.assertEquals(200, response.getStatus());
      Link consumers = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "push-subscriptions");
      System.out.println("push: " + consumers);

      PushTopicRegistration oneReg = new PushTopicRegistration();
      oneReg.setDurable(false);
      XmlLink target = new XmlLink();
      target.setMethod("post");
      target.setHref(generateURL("/push/one"));
      target.setType("application/xml");
      oneReg.setTarget(target);
      oneReg.setSelector("MyTag = '1'");
      response = consumers.request().body("application/xml", oneReg).post();
      Link oneSubscription = response.getLocation();

      PushTopicRegistration twoReg = new PushTopicRegistration();
      twoReg.setDurable(false);
      target = new XmlLink();
      target.setMethod("post");
      target.setHref(generateURL("/push/two"));
      target.setType("application/xml");
      twoReg.setTarget(target);
      twoReg.setSelector("MyTag = '2'");
      response = consumers.request().body("application/xml", twoReg).post();
      Link twoSubscription = response.getLocation();

      Order order = new Order();
      order.setName("1");
View Full Code Here

      ClientResponse response = request.head();
      Assert.assertEquals(200, response.getStatus());
      Link consumers = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "push-subscriptions");
      System.out.println("push: " + consumers);

      PushTopicRegistration oneReg = new PushTopicRegistration();
      oneReg.setDurable(false);
      XmlLink target = new XmlLink();
      target.setMethod("post");
      target.setHref(generateURL("/push/one"));
      target.setType("application/xml");
      oneReg.setTarget(target);
      oneReg.setSelector("MyTag = '1'");
      response = consumers.request().body("application/xml", oneReg).post();
      Link oneSubscription = response.getLocation();

      PushTopicRegistration twoReg = new PushTopicRegistration();
      twoReg.setDurable(false);
      target = new XmlLink();
      target.setMethod("post");
      target.setHref(generateURL("/push/two"));
      target.setType("application/xml");
      twoReg.setTarget(target);
      twoReg.setSelector("MyTag = '2'");
      response = consumers.request().body("application/xml", twoReg).post();
      Link twoSubscription = response.getLocation();

      Order order = new Order();
      order.setName("1");
View Full Code Here

TOP

Related Classes of org.hornetq.rest.topic.PushTopicRegistration

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.