Examples of Destination


Examples of org.xmlBlaster.util.qos.address.Destination

         msgSequenceNumber++;
         String content = "" + msgSequenceNumber;
        
         PublishQos pq = new PublishQos(glob);
         for(int i=0; i<sessionNameArr.length; i++)
            pq.addDestination(new Destination(sessionNameArr[i]));
        
         MsgUnit msgUnit = new MsgUnit("<key oid='"+oid+"'/>", content.getBytes(), pq.toXml());

         PublishReturnQos rq = conHolder.con.publish(msgUnit);
        
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

     
      // String oid = "Message" + "-" + counter;
      log.info("Publishing a message " + toSessionName.getRelativeName() + " ...");
      PublishKey key = new PublishKey(this.glob, "testPtPDispatch");
     
      Destination destination = new Destination(this.glob, toSessionName);
      destination.forceQueuing(forceQueuing);
      PublishQos qos = new PublishQos(this.glob, destination);
      qos.setPersistent(persistent);
  
      String content = contentPrefix + "-" + this.counter;
      this.counter++;
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

         PublishQos publishQos = new PublishQos(glob);
         msgUnit = new MsgUnit(msgUnit, null, null, publishQos.getData());
         if (ptp) {
            PublishKey pk = new PublishKey(glob);
            PublishQos pq = new PublishQos(glob);
            pq.addDestination(new Destination(new SessionName(glob, secondName)));
            msgUnit = new MsgUnit(msgUnit, pk.getData(), null, pq.getData());
         }
         publishOid = callbackConnection.publish(msgUnit).getKeyOid();
         log.info("Success: Publish " + msgUnit.getKey() + " done");
         if (!ptp)
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

         }

         // Send a message to 'receiver' and block for the reply
         PublishKey pk = new PublishKey(sender.getGlobal(), "requestForEnlightenment");
         PublishQos pq = new PublishQos(sender.getGlobal());
         pq.addDestination(new Destination(new SessionName(sender.getGlobal(), receiverName)));
         MsgUnit msgUnit = new MsgUnit(pk, "Tell me the truth!", pq);
         MsgUnit[] replies = sender.request(msgUnit, 3000, 1);
         assertEquals("Missing reply message.", 1, replies.length);
         assertEquals("On doubt no ultimate truth, my dear.", replies[0].getContentStr());
         log.info(senderName+": Got " + replies.length + " reply :\n" + replies[0].toXml());
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

         for (int i=0; i<num; i++) {
            PublishKey pk = new PublishKey(glob, oid, "text/plain", "1.0");
            pk.setDomain("RUGBY_NEWS"); // heron is master: need for routing as heron is not directly connected to us
            PublishQos pq = new PublishQos(glob);
            SessionName sessionName = heronCon.getConnectReturnQos().getSessionName(); // destination client
            Destination destination = new Destination(sessionName);
            destination.forceQueuing(true);
            pq.addDestination(destination);
            log.info("Sending PtP message '" + oid + "' from bilbo to '" + sessionName + "' :" + pq.toXml());
            MsgUnit msgUnit = new MsgUnit(pk, (contentStr+"-"+i).getBytes(), pq);
            PublishReturnQos prq = bilboCon.publish(msgUnit);
            log.info("Published message to destination='" + sessionName +
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

      if (oid != null) key.setOid(oid);
      key.setClientTags("<airport/>");
      PublishQos qos = new PublishQos(glob);
      qos.setPersistent(true);
      qos.setVolatile(true);
      qos.addDestination(new Destination(new SessionName(this.glob, "joe")));
      MsgUnit msgUnit = new MsgUnit(key, content, qos);

      this.glob.getXmlBlasterAccess().publish(msgUnit);
      if (doGc) Util.gc(2);
      try {
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

    * <p />
    * You will receive the result set wrapped in XML with a asynchronous update().
    */
   public MsgUnit toMessage() throws XmlBlasterException
   {
      PublishQos qos = new PublishQos(glob, new Destination(new SessionName(Global.instance(), "__sys__jdbc")));
      PublishKey key = new PublishKey(glob, "", "text/xml", "SQL_QUERY");
      return new MsgUnit(key, toXml().getBytes(), qos);
   }
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

    */
   public SessionName getReceiver() {
      if (this.receiver == null) {
         ArrayList list = this.msgQosData.getDestinations();
         if (list != null && list.size() >0) {
            Destination d = (Destination) list.get(0);
            this.receiver = d.getDestination();
            if (list.size() > 1)
               log.warning("Ignoring other receivers with getReceiver()");
         }
      }
      return this.receiver;
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

      if (name.equalsIgnoreCase("destination")) {
         if (!inQos)
            return;
         inDestination = true;
         this.destination = new Destination();
         if (attrs != null) {
            int len = attrs.getLength();
            for (int i = 0; i < len; i++) {
               if( attrs.getQName(i).equalsIgnoreCase("queryType") ) {
                  String queryType = attrs.getValue(i).trim();
View Full Code Here

Examples of org.xmlBlaster.util.qos.address.Destination

      if (list == null) {
         //sb.append(offset + " <Pub_Sub_style />");
      }
      else {
         for (int ii=0; ii<list.size(); ii++) {
            Destination destination = (Destination)list.get(ii);
            sb.append(destination.toXml(extraOffset+Constants.INDENT));
         }
      }
      if (msgQosData.getSender() != null) {
         sb.append(offset).append(" <sender>").append(msgQosData.getSender().getAbsoluteName()).append("</sender>");
      }
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.