org.graphstream.stream.net
Class HTTPSource

java.lang.Object
  extended by org.graphstream.stream.SourceBase
      extended by org.graphstream.stream.net.HTTPSource
All Implemented Interfaces:
Source

public class HTTPSource
extends SourceBase

This source allows to control a graph from a web browser. Control is done calling the following url : http://host/graphId/edit?q=ACTION&.... ACTION is one of the following action :

Each of these actions needs some argument.
an
cn
dn
ae
ce
de
cg
st


Nested Class Summary
 
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
SourceBase.ElementType
 
Constructor Summary
HTTPSource(String graphId, int port)
          Create a new http source.
 
Method Summary
 void start()
          Start the http server.
 void stop()
          Stop the http server.
 
Methods inherited from class org.graphstream.stream.SourceBase
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPSource

public HTTPSource(String graphId,
                  int port)
           throws IOException
Create a new http source. The source will be available on 'http://localhost/graphId' where graphId is passed as parameter of this constructor.

Parameters:
graphId - id of the graph
port - port on which server will be bound
Throws:
IOException - if server creation failed.
Method Detail

start

public void start()
Start the http server.


stop

public void stop()
Stop the http server.



Copyright © 2012. All Rights Reserved.