org.graphstream.stream.net
Class HTTPSource
java.lang.Object
org.graphstream.stream.SourceBase
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 :
- an : add node
- cn : change node
- dn : delete node
- ae : add edge
- ce : change edge
- de : delete edge
- cg : change graph
- st : step begins
- clear : clear the whole graph
Each of these actions needs some argument.
- an
-
- cn
-
- dn
-
- ae
-
- ce
-
- de
-
- cg
-
- st
-
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 |
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 graphport
- port on which server will be bound
- Throws:
IOException
- if server creation failed.
start
public void start()
- Start the http server.
stop
public void stop()
- Stop the http server.
Copyright © 2013. All Rights Reserved.