Package org.xmlBlaster.client.qos

Examples of org.xmlBlaster.client.qos.ConnectQos


      log.info("XmlBlaster is ready for testing subscribe MIME filter");

      try {
         log.info("Connecting ...");
         con = glob.getXmlBlasterAccess();
         ConnectQos qos = new ConnectQos(glob, name, passwd);
         con.connect(qos, this); // Login to xmlBlaster
      }
      catch (Exception e) {
         Thread.currentThread().dumpStack();
         log.severe("Can't connect to xmlBlaster: " + e.toString());
      }

      // Subscribe to a message with a supplied filter
      try {
         SubscribeQos qos = new SubscribeQos(glob);
         qos.addAccessFilter(new AccessFilterQos(glob, "ContentLenFilter", "1.0", ""+filterMessageContentBiggerAs));

         String subscribeOid = con.subscribe("<key oid='MSG'/>", qos.toXml()).getSubscriptionId();
         log.info("Success: Subscribe subscription-id=" + subscribeOid + " done");

         con.subscribe("<key oid='" + Constants.OID_DEAD_LETTER + "'/>", "<qos/>");
       
      } catch(XmlBlasterException e) {
View Full Code Here


   protected void setUp()
   {
      try {
         senderConnection = glob.getXmlBlasterAccess(); // Find orb
         String passwd = "secret";
         ConnectQos connectQos = new ConnectQos(glob, senderName, passwd);
         senderConnection.connect(connectQos, this); // Login to xmlBlaster
      }
      catch (Exception e) {
          log.severe("Login failed: " + e.toString());
          e.printStackTrace();
View Full Code Here

      try {
         this.senderConnection = glob.getXmlBlasterAccess();
         String passwd = "secret";
         this.msgInterceptor = new MsgInterceptor(this.glob, log, null);
         this.msgInterceptor.countErased(true); // count erased() notifications as well
         this.senderConnection.connect(new ConnectQos(glob, senderName, passwd), this.msgInterceptor); // Login to xmlBlaster
      }
      catch (Exception e) {
         e.printStackTrace();
         fail("Login failed: " + e.toString());
      }
View Full Code Here

         FileLocator.deleteDir(file);
      */
      try {
         this.connGlobal = this.global.getClone(null);
         this.updateInterceptor = new MsgInterceptor(this.connGlobal, log, null);
         this.connGlobal.getXmlBlasterAccess().connect(new ConnectQos(this.connGlobal), this.updateInterceptor);
         SubscribeQos subQos = new SubscribeQos(this.connGlobal);
         subQos.setWantInitialUpdate(false);
         this.connGlobal.getXmlBlasterAccess().subscribe(new SubscribeKey(this.connGlobal, this.oid), subQos);
      }
      catch (XmlBlasterException ex) {
View Full Code Here

      assertTrue("file '" + this.dirNameDiscarded + "' does not exist", file.exists());
   }
  
   private String getConnectQos(Global glob) {
      try {
         ConnectQos connQos = new ConnectQos(glob, "filePollerTestUser", "secret");
         connQos.setMaxSessions(100);
         Address address = connQos.getAddress();
         address.setPingInterval(0L);
         address.setCollectTime(0L);
         connQos.getClientQueueProperty().setType("RAM");
         connQos.getClientQueueProperty().setVersion("1.0");
         return connQos.toXml();
      }
      catch (XmlBlasterException ex) {
         fail("an exception when building the connect qos: " + ex.getMessage());
         return null;
      }
View Full Code Here

      try {
         String passwd = "secret";

         Global receiverGlob = glob.getClone(null);
         receiverConnection = receiverGlob.getXmlBlasterAccess();
         receiverConnection.connect(new ConnectQos(receiverGlob, receiverName, passwd), this);

         Global receiver2Glob = glob.getClone(null);
         receiver2Connection = receiver2Glob.getXmlBlasterAccess();
         receiver2Connection.connect(new ConnectQos(receiver2Glob, receiver2Name, passwd), this);

         Global receiver3Glob = glob.getClone(null);
         senderConnection = receiver3Glob.getXmlBlasterAccess();
         senderConnection.connect(new ConnectQos(receiver3Glob, senderName, passwd), this);
      }
      catch (Exception e) {
          log.severe(e.toString());
          e.printStackTrace();
      }
View Full Code Here

   }

   private void connect() {
      try {
         senderConnection = glob.getXmlBlasterAccess(); // Find orb
         ConnectQos qos = new ConnectQos(glob);
         qos.setDuplicateUpdates(duplicates);
         senderConnection.connect(qos, this);
      }
      catch (Exception e) {
          log.severe("Login failed: " + e.toString());
          e.printStackTrace();
View Full Code Here

         cbServer.initialize(this.glob, loginName, cba, this);

         corbaConnection = new CorbaConnection();
         corbaConnection.init(glob, null);
         //cbServer = new CorbaCallbackServer(this.glob, loginName, this, corbaConnection.getOrb());
         ConnectQos connectQos = new ConnectQos(glob, loginName, passwd);
         corbaConnection.connect(connectQos.toXml());
      }
      catch (Exception e) {
          log.severe(e.toString());
          e.printStackTrace();
      }
View Full Code Here

      log.info("XmlBlaster is ready for testing on bootstrapPort " + serverPort);
      try {
         con = glob.getXmlBlasterAccess(); // Find orb

         String passwd = "secret";
         ConnectQos connectQos = new ConnectQos(glob, senderName, passwd); // == "<qos>...</qos>";

         // Setup fail save handling ...
         Address addressProp = new Address(glob);
         addressProp.setDelay(reconnectDelay); // retry connecting every 2 sec
         addressProp.setRetries(-1);       // -1 == forever
         addressProp.setPingInterval(-1L); // switched off
         con.registerConnectionListener(this);

         connectQos.setAddress(addressProp);

         this.updateInterceptor = new MsgInterceptor(this.glob, log, null); // Collect received msgs

         con.connect(connectQos, this.updateInterceptor)// Login to xmlBlaster, register for updates
      }
View Full Code Here


      numReceived = 0;
      try {
         oneConnection = glob.getXmlBlasterAccess(); // Find orb
         ConnectQos connectQos = new ConnectQos(glob, oneName, "secret"); // "<qos></qos>"; During login this is manipulated (callback address added)
         // If we have many subs on one con, we must raise the max size of the callback queue!
         CbQueueProperty cbProp =connectQos.getSessionCbQueueProperty();
         cbProp.setMaxEntries(numSubscribers+1000);
         cbProp.setMaxEntriesCache(numSubscribers+1000);
         this.updateInterceptor = new MsgInterceptor(this.glob, log, this); // Collect received msgs
         ConnectReturnQos connectReturnQos = oneConnection.connect(connectQos, this.updateInterceptor);
         log.info("Connected: " + connectReturnQos.toXml());
View Full Code Here

TOP

Related Classes of org.xmlBlaster.client.qos.ConnectQos

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.