Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.Global


      }
   }

   public void testXsltTransformation() throws Exception {
      ServerScope scope = new ServerScope();
      Global glob = scope;
      XPathFilter filter = new XPathFilter();
      filter.initialize(scope);
      String content = "<a><b/></a>";
      String xslFile = "test.xsl";
      String queryStr = "/a";
View Full Code Here


         con = glob.getXmlBlasterAccess();
         ConnectQos qos = new ConnectQos(null, "admin", passwd);
        
         // We configure detailed how our callback is handled by xmlBlaster
         // In connect() a default callback server is created and its address is added to cbProps
         CallbackAddress cbProps = new CallbackAddress(new Global());
         cbProps.setCollectTime(0L); // dispatch/callback/burstMode/collectTime"
         cbProps.setSecretSessionId(cbSessionId);
         cbProps.setPingInterval(10000);
         cbProps.setRetries(1);
         cbProps.setDelay(1000);
View Full Code Here

    * Method is used by TestRunner to load these tests
    */
   public static Test suite() {
       TestSuite suite= new TestSuite();
       String loginName = "Tim";
       suite.addTest(new TestCallbackConfig(new Global(), "testCbSessionId", "Tim"));
       return suite;
   }
View Full Code Here

    *
    *  java org.xmlBlaster.test.qos.TestCallbackConfig
    * </pre>
    */
   public static void main(String args[]) {
      TestCallbackConfig testSub = new TestCallbackConfig(new Global(args), "TestCallbackConfig", "Tim");
      testSub.setUp();
      testSub.testCbSessionId();
      testSub.tearDown();
   }
View Full Code Here

    */
   public static Test suite()
   {
       TestSuite suite= new TestSuite();
       String loginName = "Tim";
       suite.addTest(new TestGetFilter(new Global(), "testFilter", "Tim"));
       return suite;
   }
View Full Code Here

    *   java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.mime.TestGetFilter
    * <pre>
    */
   public static void main(String args[])
   {
      Global glob = new Global();
      if (glob.init(args) != 0) {
         System.err.println(ME + ": Init failed");
         System.exit(1);
      }
      TestGetFilter testSub = new TestGetFilter(glob, "TestGetFilter", "Tim");
      testSub.setUp();
View Full Code Here

   private I_XmlBlasterAccess conSnd;
   private MsgInterceptor updateInterceptorSnd;

   /** For Junit */
   public TestPtPSubscribable() {
      this(new Global(), "TestPtPSubscribable");
   }
View Full Code Here

   public void testSubscribable() {
      log.info("testSubscribable("+sessionNameRcv+") ...");

      try {
         log.info("============ STEP 1: Start publisher client");
         Global globSnd = glob.getClone(null);
         conSnd = globSnd.getXmlBlasterAccess();
         ConnectQos qosSnd = new ConnectQos(globSnd);
         String secretSndCbSessionId = "TrustMeSubSnd";
         CallbackAddress addrSnd = new CallbackAddress(globSnd);
         addrSnd.setSecretCbSessionId(secretSndCbSessionId);
         qosSnd.getSessionCbQueueProperty().setCallbackAddress(addrSnd);
         this.updateInterceptorSnd = new MsgInterceptor(globSnd, log, null);
         ConnectReturnQos crqPub = conSnd.connect(qosSnd, this.updateInterceptorSnd);
         log.info("Connect success as " + crqPub.getSessionName());

         log.info("============ STEP 2: Subscribe in Pub/Sub mode");
         SubscribeKey sk = new SubscribeKey(globSnd, oid);
         SubscribeQos sq = new SubscribeQos(globSnd);
         sq.setWantInitialUpdate(false);
         sq.setWantLocal(true);
         SubscribeReturnQos srq = conSnd.subscribe(sk, sq);
         log.info("Subscription to '" + oid + "' done");
         assertEquals("", 0, this.updateInterceptorSnd.waitOnUpdate(1000L, oid, Constants.STATE_OK));

         log.info("============ STEP 3: Start receiver");
         Global globRcv = glob.getClone(null);
         conRcv = globRcv.getXmlBlasterAccess();
         ConnectQos qosRcv = new ConnectQos(globRcv, sessionNameRcv, passwd);
         CallbackAddress addr = new CallbackAddress(globRcv);
         addr.setRetries(-1);
         String secretCbSessionId = "TrustMeSub";
         addr.setSecretCbSessionId(secretCbSessionId);
View Full Code Here

    *   java org.xmlBlaster.test.qos.TestPtPSubscribable
    *   java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.qos.TestPtPSubscribable
    * <pre>
    */
   public static void main(String args[]) {
      TestPtPSubscribable testSub = new TestPtPSubscribable(new Global(args), "TestPtPSubscribable");
      testSub.setUp();
      testSub.testSubscribable();
      testSub.tearDown();
   }
View Full Code Here

   }
  
  
   public GlobalInfo prepare(String[] args) throws Exception {
      cmdLineArgs = args;
      Global global = new Global(cmdLineArgs);
      GlobalInfo cfgInfo = createOwnGlobalInfo(global, null, "configuration");
      stopWatcherOnIU = fillInfoWithCommandLine(cmdLineArgs, cfgInfo);
      return cfgInfo;
   }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.Global

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.