Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.Global


    */
   public static Test suite()
   {
       TestSuite suite= new TestSuite();
       String loginName = "Tim";
       suite.addTest(new TestSubLostClient(new Global(), "testManyClients", 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.TestSubLostClient</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);
      }
      TestSubLostClient testSub = new TestSubLostClient(glob, "TestSubLostClient", "Tim");
      testSub.setUp();
View Full Code Here

*/
public class Main {

  public static void main(String[] args) {
    //get Globals and Log
    Global glob = new Global(args);

    // currently commented out due to a deadlock ...
//    SplashWindow sw = new SplashWindow("tims_rainbowfish.gif",null, 5000);
    MainFrame f = new MainFrame(glob);
//    cc.start();
View Full Code Here

               args[count++] = name;
            args[count++] = conf.getInitParameter(name);
            //Global.instance().getLog(null).info("", "Reading web.xml property " + args[count-2] + "=" + args[count-1]);
         }

         glob = new Global();
         int ret = glob.init(args);

         if (ret != 0) {
            // init problems
         }
View Full Code Here

   }
    */
  
   // java org.xmlBlaster.util.XmlNotPortable
   public static void main(String[] args) {
      Global glob = new Global(args);
     
      // Instantiate the xmlBlaster DOM tree with <xmlBlaster> root node (DOM portable)
      org.w3c.dom.Document bigDoc = null;
      String xml = "<?xml version='1.0' encoding='ISO-8859-1' ?>\n" +
                   "<xmlBlaster></xmlBlaster>";
      java.io.StringReader reader = new java.io.StringReader(xml);
      org.xml.sax.InputSource input = new org.xml.sax.InputSource(reader);
      try {
         DocumentBuilderFactory dbf = glob.getDocumentBuilderFactory();
         //dbf.setNamespaceAware(true);
         //dbf.setCoalescing(true);
         //dbf.setValidating(false);
         //dbf.setIgnoringComments(true);
         DocumentBuilder db = dbf.newDocumentBuilder ();
View Full Code Here

public class XmlUtil {
   private static Logger log = Logger.getLogger(XmlUtil.class.getName());
  private Global glob = null;

  public XmlUtil() {
    this.glob = new Global();

  }
View Full Code Here

    }
    return "";
  }

  public void init(HttpServletRequest req, Properties props) throws XmlBlasterException {
    this.glob = new Global(props);
    this.xmlBlasterAccess = this.glob.getXmlBlasterAccess();
    this.id = this.xmlBlasterAccess.getId();
    this.session = req.getSession();
    this.sessionId = this.session.getId();
    this.clientInfo = this.ajaxServlet.getInfo(req, true, false);
View Full Code Here

      while(enumer.hasMoreElements()) {
         String name = (String)enumer.nextElement();
         if (name != null && name.length() > 0)
            props.setProperty(name, conf.getInitParameter(name));
      }
      this.initialGlobal = new Global();
      if (this.initialGlobal.init(props) != 0)
         System.out.println("AppletServlet: Global initialization problem: " + this.initialGlobal.getErrorText());

      // Redirect xmlBlaster logs to servlet log file (see method log() below)
      // Use xmlBlaster/demo/http/WEB-INF/web.xml to configure logging.
View Full Code Here

   protected void connect(String ME, Logger log, HttpSession session, String qos, HttpServletRequest req, HttpServletResponse res)
      throws XmlBlasterException, IOException, ServletException {
      if (qos == null || qos.length() < 1)
         throw new XmlBlasterException(this.initialGlobal, ErrorCode.USER_CONFIGURATION, ME, "Missing connect QoS. Pass xmlBlaster.connectQos='<qos> ... </qos>' with your URL in your POST in a hidden form field or in your cookie.");

      Global glob = this.initialGlobal.getClone(null);
      ConnectQos connectQos;
      boolean warnAuth = false;
      if (qos.toLowerCase().indexOf("securityservice") >= 0) {
         connectQos = new ConnectQos(glob, glob.getConnectQosFactory().readObject(qos)); // Applet provides authentication
      }
      else {
         connectQos = new ConnectQos(glob)// User servlets default authentication setting
         warnAuth = true;
      }
      ME  += connectQos.getSessionName().getLoginName() + "-" + session.getId();
           
      if (warnAuth)
         log.warning("Login action, applet has not supplied connect QoS authentication information - we login with the servlets default authentication settings");
      else
         log.info("Login action with applet supplied connect QoS authentication information");

      I_XmlBlasterAccess xmlBlasterAccess = glob.getXmlBlasterAccess();
      PushHandler pushHandler = new PushHandler(req, res, session.getId(),
                                               connectQos.getSessionName().getRelativeName(),
                                               xmlBlasterAccess, this.timeout);
      xmlBlasterAccess.connect(connectQos, pushHandler);
      pushHandler.startPing();
View Full Code Here

      String sessionId = req.getRequestedSessionId();

      ME  += "-" + sessionId;
      if (log.isLoggable(Level.FINE)) log.fine("Entering servlet doPost() ...");

      Global glob = null;
      I_XmlBlasterAccess xmlBlaster = null;
      PushHandler pushHandler = null;
      Object returnObject = null;

      try {
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.