Package org.graphstream.stream.gephi

Examples of org.graphstream.stream.gephi.JSONReceiver


  graph.addAttribute("ui.antialias");
  graph.addAttribute("ui.stylesheet", styleSheet);

  // ----- On the receiver side -----
  // build the receiver that waits for events
  receiver = new JSONReceiver("localhost", 8080, "workspace0");
  // receiver.setDebug(true);
  ThreadProxyPipe pipe = receiver.getStream();
  // plug the pipe to the sink of the graph
  // pipe.addSink(graph);
  pipe.addElementSink(graph);
View Full Code Here


  //
  // - a graph that will display the received events
  Graph g = new MultiGraph("G", false, true);
  g.display();
  // - the receiver that waits for events
  JSONReceiver receiver = new JSONReceiver("localhost", 8080,
    "workspace0");
  receiver.setDebug(true);
  // - received events end up in the "default" pipe
  ThreadProxyPipe pipe = receiver.getStream();
  // - plug the pipe to the sink of the graph
  pipe.addSink(g);
  // ----- The sender side (in another thread) ------
  //
  new Thread() {
View Full Code Here

     * note attribute
     */
    // @Test
    public void testJSONStreamAttributesChanges() {

  JSONReceiver receiver = new JSONReceiver("localhost", 8080,
    "workspace0");

  receiver.setDebug(true);

  ThreadProxyPipe pipe = receiver.getStream();

  Graph g = new MultiGraph("workspace0", false, true);

  pipe.addSink(g);

View Full Code Here

    // @Test
    public void testJSONStreamMultiThreadSenders() {

  Graph g = new MultiGraph("workspace0");

  JSONReceiver receiver = new JSONReceiver("localhost", 8080,
    "workspace0");

  // receiver.setDebug(true);

  ThreadProxyPipe pipe = receiver.getStream();

  pipe.addSink(g);

  launchClient("localhost", 8080, "workspace0", "0");
  launchClient("localhost", 8080, "workspace0", "1");
View Full Code Here

    @Test
    public void testJSONStreamEvents() {

  Graph g = new DefaultGraph("workspace0", false, true);

  JSONReceiver receiver = new JSONReceiver("localhost", 8080,
    "workspace0");

  ThreadProxyPipe pipe = receiver.getStream();

  pipe.addSink(g);

  g.addSink(new SinkAdapter() {
      /*
 
View Full Code Here

  //
  // a graph that will display the received events
  Graph g = new MultiGraph("G", false, true);
  g.display();
  // the receiver that waits for events
  JSONReceiver receiver = new JSONReceiver("localhost", 8080,
    "workspace0");
  receiver.setDebug(true);
  ThreadProxyPipe pipe = receiver.getStream();
  // plug the pipe to the sink of the graph
  pipe.addSink(g);
  // The receiver pro-actively checks for events on the ThreadProxyPipe
  while (true) {
      pipe.pump();
View Full Code Here

TOP

Related Classes of org.graphstream.stream.gephi.JSONReceiver

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.