Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.Global


    * Sets up the fixture, connect to xmlBlaster 3 times.
    */
   protected void setUp() {
      ConnectQos connectQos;
      try {
         Global glob1 = glob.getClone(null);
         con1 = glob1.getXmlBlasterAccess(); // Find orb
         connectQos = new ConnectQos(glob1, "con1", "secret");
         con1.connect(connectQos,  new I_Callback() {
            public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
               log.info("Reveiving asynchronous message '" + updateKey.getOid() + "' in default handler");
               numReceived1++;
               assertEquals("Message not expected", "command-navigation", updateKey.getOid());
               messageArrived1.append("OK");
               return "";
            }
         });

         Global glob2 = glob.getClone(null);
         con2 = glob2.getXmlBlasterAccess(); // Find orb
         connectQos = new ConnectQos(glob2, "con2", "secret");
         con2.connect(connectQos,  new I_Callback() {
            public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
               log.info("Reveiving asynchronous message '" + updateKey.getOid() + "' in default handler");
               numReceived2++;
               assertEquals("Message not expected", "command-radar-1", updateKey.getOid());
               messageArrived2.append("OK");
               return "";
            }
         });

         Global glob3 = glob.getClone(null);
         con3 = glob3.getXmlBlasterAccess(); // Find orb
         connectQos = new ConnectQos(glob3, "con3", "secret");
         con3.connect(connectQos,  new I_Callback() {
            public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) {
               log.info("Reveiving asynchronous message '" + updateKey.getOid() + "' in default handler");
               numReceived3++;
View Full Code Here


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

    *  java org.xmlBlaster.test.classtest.queue.CacheQueueTest
    * </pre>
    */
   public static void main(String args[]) {

      Global glob = new Global(args);
      CacheQueueTest testSub = new CacheQueueTest(glob, "CacheQueueTest");

      long startTime = System.currentTimeMillis();

      testSub.setUp();
View Full Code Here

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

    *   java -Djava.compiler= junit.textui.TestRunner -noloading org.xmlBlaster.test.mime.TestXPathSubscribeFilter
    * <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);
      }
      TestJ2eeServices testSub = new TestJ2eeServices(glob, "TestLocalProtocol");      try {
         testSub.setUp();
View Full Code Here

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

    * @deprecated Use the TestRunner from the testsuite to run it:<p />
    * <pre>   java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.qos.TestSubNoInitial</pre>
    */
   public static void main(String args[])
   {
      Global glob = new Global();
      if (glob.init(args) != 0) {
         System.out.println("Init failed");
         System.exit(1);
      }
      TestSubNoInitial testSub = new TestSubNoInitial(glob, "TestSubNoInitial", "Tim");
      testSub.setUp();
View Full Code Here

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

   /**
    * Invoke: java org.xmlBlaster.test.topic.TestTopicHistory -startEmbedded false
    */
   public static void main(String args[]) {
      TestTopicHistory testSub = new TestTopicHistory(new Global(args), "TestTopicHistory");
      testSub.setUp();
      testSub.testHistory();
      testSub.tearDown();
   }
View Full Code Here

*/
public class XPathTransformerTest extends XMLTestCase {

   public void testXpathQos() throws Exception {
      ServerScope scope = new ServerScope();
      Global glob = scope;
      XPathFilter filter = new XPathFilter();
      filter.initialize(scope);
      String content = "SomethingFancy";
      String queryStr = "/qos";
      String qos = "<qos/>";
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.