Package org.graphstream.stream.thread

Examples of org.graphstream.stream.thread.ThreadProxyPipe.addSink()


      fail(e1.toString());
    }

    ThreadProxyPipe pipe = net.getDefaultStream();

    pipe.addSink(g1);

    g1.addSink(new Sink() {

      public void graphAttributeAdded(String sourceId, long timeId,
          String attribute, Object value) {
View Full Code Here


    net.setDebugOn(false);
   
    // - received events end up in the "default" pipe
    ThreadProxyPipe pipe = net.getDefaultStream();
    // - plug the pipe to the sink of the graph
    pipe.addSink(g);

    // ----- The sender side (in another thread) ------
    //
    new Thread() {
View Full Code Here

      fail(e1.toString());
    }

    ThreadProxyPipe pipe = net.getDefaultStream();

    pipe.addSink(new Sink() {
      public void graphAttributeAdded(String sourceId, long timeId,
          String attribute, Object value) {
        assertEquals(0, value);
        assertEquals("graphAttribute", attribute);
      }
View Full Code Here

    source.getNode("A").addAttribute("A1", "foo");
    source.getNode("A").addAttribute("A2", "foo");

    ThreadProxyPipe proxy = new ThreadProxyPipe();
    proxy.addSink(target);
    proxy.init(source, true);

    Thread other = new Thread(new AnotherThread(proxy, target) {
      public void run() {
        // The second part of the test starts
View Full Code Here

    Actor a = new Actor(tpp);
    Thread t = new Thread(a);

    g.addSink(dgs1);
    tpp.addSink(dgs2);

    dgs1.begin(w1);
    dgs2.begin(w2);

    t.start();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.