Package org.xmlBlaster.client.key

Examples of org.xmlBlaster.client.key.SubscribeKey.toXml()


               }
            });

         sk = new SubscribeKey(glob2, oid);
         sq = new SubscribeQos(glob2);
         con2.subscribe(sk.toXml(), sq.toXml());

         sk = new SubscribeKey(glob2, Constants.OID_DEAD_LETTER);
         sq = new SubscribeQos(glob2);
         con2.subscribe(sk.toXml(), sq.toXml(), new I_Callback() {
            public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
View Full Code Here


         sq = new SubscribeQos(glob2);
         con2.subscribe(sk.toXml(), sq.toXml());

         sk = new SubscribeKey(glob2, Constants.OID_DEAD_LETTER);
         sq = new SubscribeQos(glob2);
         con2.subscribe(sk.toXml(), sq.toXml(), new I_Callback() {
            public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
               deadMessageCounter++;
               log.info("****** Reveiving asynchronous message '" + updateKey.getOid() + "' in deadMessage handler, content=" + new String(content));
               assertEquals("No dead letter received", Constants.OID_DEAD_LETTER, updateKey.getOid());
               return "";
View Full Code Here

            SubscribeQos qos = new SubscribeQos(glob);
            qos.setMultiSubscribe(false);
            if (aq != null) {
               qos.addAccessFilter(aq);
            }
            SubscribeReturnQos ret = this.connection.subscribe(key.toXml(), qos.toXml());
            log.info("Subscribe #" + i + " state=" + ret.getState() + " subscriptionId=" + ret.getSubscriptionId());
            if (subscribeId == null) {
               subscribeId = ret.getSubscriptionId();
               assertEquals("", Constants.STATE_OK, ret.getState());
               continue;
View Full Code Here

         {
            SubscribeKey key = new SubscribeKey(glob, publishOid);
            SubscribeQos qos = new SubscribeQos(glob);
            qos.setWantLocal(false);
            this.updateInterceptor1 = new MsgInterceptor(glob, log, null); // Collect received msgs
            SubscribeReturnQos ret = this.connection.subscribe(key.toXml(), qos.toXml(), this.updateInterceptor1);
            subscribeId1 = ret.getSubscriptionId();
         }
         {
            SubscribeKey key = new SubscribeKey(glob, publishOid);
            SubscribeQos qos = new SubscribeQos(glob);
View Full Code Here

         {
            SubscribeKey key = new SubscribeKey(glob, publishOid);
            SubscribeQos qos = new SubscribeQos(glob);
            qos.setWantLocal(true);
            this.updateInterceptor2 = new MsgInterceptor(glob, log, null); // Collect received msgs
            SubscribeReturnQos ret = connection.subscribe(key.toXml(), qos.toXml(), this.updateInterceptor2);
            subscribeId2 = ret.getSubscriptionId();
         }
      } catch(XmlBlasterException e) {
         log.warning("XmlBlasterException: " + e.getMessage());
         fail("subscribe - XmlBlasterException: " + e.getMessage());
View Full Code Here

      try {
         SubscribeKey subscribeKey = new SubscribeKey(glob, "oid");
         subscribeKey.setDomain("domain");
         subscribeKey.setQueryString("//query");

         System.out.println("SubscribeKey: " + subscribeKey.toXml());

         QueryKeyData key = factory.readObject(subscribeKey.toXml());

         assertEquals("", "oid", key.getOid());
         assertEquals("", "domain", key.getDomain());
View Full Code Here

         subscribeKey.setDomain("domain");
         subscribeKey.setQueryString("//query");

         System.out.println("SubscribeKey: " + subscribeKey.toXml());

         QueryKeyData key = factory.readObject(subscribeKey.toXml());

         assertEquals("", "oid", key.getOid());
         assertEquals("", "domain", key.getDomain());
         assertEquals("", "//query", key.getQueryString());
         assertEquals("", "XPATH", key.getQueryType()); // The last was setQueryString() so this is the used type
View Full Code Here

     
      try {
         SubscribeKey subscribeKey = new SubscribeKey(glob, "myOid", "EXACT");

         assertEquals("", "myOid", subscribeKey.getOid());
         System.out.println("SubscribeKey: " + subscribeKey.toXml());

         QueryKeyData key = factory.readObject(subscribeKey.toXml());

         assertEquals("", "myOid", key.getOid());
         assertEquals("", KeyData.CONTENTMIME_DEFAULT, key.getContentMime());
View Full Code Here

         SubscribeKey subscribeKey = new SubscribeKey(glob, "myOid", "EXACT");

         assertEquals("", "myOid", subscribeKey.getOid());
         System.out.println("SubscribeKey: " + subscribeKey.toXml());

         QueryKeyData key = factory.readObject(subscribeKey.toXml());

         assertEquals("", "myOid", key.getOid());
         assertEquals("", KeyData.CONTENTMIME_DEFAULT, key.getContentMime());
         assertEquals("", KeyData.CONTENTMIMEEXTENDED_DEFAULT, key.getContentMimeExtended());
         assertEquals("", (String)null, key.getDomain());
View Full Code Here

         subscribeKey.getData().setContentMime("AAA");
         subscribeKey.getData().setContentMimeExtended("BBB");
         subscribeKey.setDomain("CCC");

         assertEquals("", "myOid", subscribeKey.getOid());
         System.out.println("SubscribeKey: " + subscribeKey.toXml());

         QueryKeyData key = factory.readObject(subscribeKey.toXml());

         assertEquals("", (String)null, key.getOid());
         assertEquals("", "AAA", key.getContentMime());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.