Examples of JsonReceiver


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

Examples of org.graphstream.stream.gephi.JSONReceiver

  //
  // - 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

Examples of org.graphstream.stream.gephi.JSONReceiver

     * 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

Examples of org.graphstream.stream.gephi.JSONReceiver

    // @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

Examples of org.graphstream.stream.gephi.JSONReceiver

    @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

Examples of org.graphstream.stream.gephi.JSONReceiver

  //
  // 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

Examples of org.persvr.remote.JsonReceiver

    },false,true);
    set("deserialize", new PersevereNativeFunction() {
      @Override
      public Object call(Context cx, Scriptable scope,
          Scriptable thisObj, Object[] args) {
        return new JsonReceiver().convertJsonStringToObject((String) args[0]);
      }
    },true,false);
    set("serialize", new PersevereNativeFunction() {
      @Override
      public Object call(Context cx, Scriptable scope,
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.