Package simtools.logging

Examples of simtools.logging.LoggingEntryByteBuffer$Handler


      MenuResourceBundle menuResources) {
    super(parent, propertiesPrefix, menuResources);
  }

  protected AbstractLoggingTableModel createTableModel(){
    return new LoggingBufferTableModel(new LoggingEntryByteBuffer(),menuResources);
  }
View Full Code Here


    if(args.length>0){
      JFrame f=new JFrame("Reading XML");
      LoggingBufferPanel lp=new LoggingBufferPanel(f,"test",null);
      f.getContentPane().add(lp);

      final LoggingEntryByteBuffer buffer=lp.getBuffer();
      try {
        buffer.readXML(new File(args[0]));
      } catch (ParserConfigurationException e1) {
        e1.printStackTrace();
        System.exit(0);
      } catch (SAXException e1) {
        e1.printStackTrace();
        System.exit(0);
      } catch (IOException e1) {
        e1.printStackTrace();
        System.exit(0);
      }

      f.addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e){
          new TestBinary(buffer,args[0]);
        }
      });

      f.pack();
      f.show();
    }
    else{
      JFrame f=new JFrame("Reading Binary Socket");
      LoggingBufferPanel lp=new LoggingBufferPanel(f,"test",null);
      f.getContentPane().add(lp);

      final LoggingEntryByteBuffer buffer=lp.getBuffer();
      try {
        buffer.openServer(4321);
        ((LoggingBufferTableModel)lp.getLogbookModel()).startRefreshLoop();
      } catch(IOException ie){
        ie.printStackTrace();
        System.exit(0);
      }
      Logger lr = null;
      try {
        SocketBufferHandler sbh=new SocketBufferHandler("localhost",4321);
        lr=Logger.getLogger("TEST");
        lr.addHandler(sbh);
        lr.setUseParentHandlers(false);
        lr.warning("Start");
      } catch (IOException e) {
        e.printStackTrace();
        System.exit(0);
      }
      f.addWindowListener( new WindowAdapter() {
        public void windowClosing(WindowEvent e){
          try {
            buffer.closeServer();
          } catch (IOException e1) {
            e1.printStackTrace();
            System.exit(0);
          }
          new TestBinary(buffer,"TEST");
View Full Code Here

      }
      JFrame f2=new JFrame("Reading binary");
      LoggingBufferPanel lp2=new LoggingBufferPanel(f2,"test",null);
      f2.getContentPane().add(lp2);

      LoggingEntryByteBuffer buffer2=lp2.getBuffer();
      try {
        buffer2.read(new File(fileName+".bin"));
      } catch (IOException e1) {
        e1.printStackTrace();
        System.exit(0);
      }
View Full Code Here

    private RefreshCyclicCaller refreshCyclicCaller;

  public LoggingBufferTableModel(int size, MenuResourceBundle resources) {
    super(resources);
    buffer=new LoggingEntryByteBuffer(size);
  }
View Full Code Here

TOP

Related Classes of simtools.logging.LoggingEntryByteBuffer$Handler

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.