Package net.sf.qxs.messenger

Examples of net.sf.qxs.messenger.OutputStreamMessenger


 
  private Messenger createMessenger(ServerConfig cfg) throws FileNotFoundException
  {
    Messenger reporter;
    if (svr.getErrorLogFile() != null)
      reporter = new OutputStreamMessenger(new FileOutputStream(svr.getErrorLogFile(), true));
    else
      reporter = new OutputStreamMessenger(System.err);

    reporter = new TimestampPrefixMessenger(reporter);
    reporter = new FormatMessenger(reporter);
    return reporter;
  }
View Full Code Here


  }
 
  public void run()
    throws Exception
  {
    run(new OutputStreamMessenger(System.out));
  }
View Full Code Here

  }
 
  public Servlet(Configuration cfg, Messenger logger)
  {
    this.cfg = cfg;
    this.reporter = logger!=null ? logger : new OutputStreamMessenger(System.out);
  }
View Full Code Here

  public static void main(String[] args)
  {
    if (args.length != 1)
      usage();

    Messenger msgr = new OutputStreamMessenger(System.err);

    InputStream is = null;
    if (args[0].equals("-"))
      is = System.in;
    else
    {
      try
      {
        is = new FileInputStream(args[0]);
      }
      catch (FileNotFoundException e)
      {
        msgr.fatal("File not found: "+e.getMessage());
        System.exit(1);
      }
    }

    if (!Worker.doWork(is, System.out, msgr))
View Full Code Here

    throws Exception
  {
    PipelineSimulator data = PipelineSimulator.parseURL(ClassLoader.getSystemResource(CFG_TEST), cf);
    fmp.addModule("test-pipeline", new FakeModule(data));

    data.run(new OutputStreamMessenger(System.err));
  }
View Full Code Here

TOP

Related Classes of net.sf.qxs.messenger.OutputStreamMessenger

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.