public class HTTPSource extends SourceBase
http://host/graphId/edit?q=ACTION&...
. ACTION is one of the
following action :
Modifier and Type | Class and Description |
---|---|
(package private) static class |
HTTPSource.Action |
private class |
HTTPSource.EditHandler |
SourceBase.ElementType
Modifier and Type | Field and Description |
---|---|
protected com.sun.net.httpserver.HttpServer |
server
Http server.
|
attrSinks, eltsSinks, eventProcessing, eventQueue, sourceId, sourceTime
Constructor and Description |
---|
HTTPSource(java.lang.String graphId,
int port)
Create a new http source.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
error(com.sun.net.httpserver.HttpExchange ex,
java.lang.String message) |
protected static java.util.HashMap<java.lang.String,java.lang.Object> |
GET(com.sun.net.httpserver.HttpExchange ex) |
void |
start()
Start the http server.
|
void |
stop()
Stop the http server.
|
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, manageEvents, 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
public HTTPSource(java.lang.String graphId, int port) throws java.io.IOException
graphId
- id of the graphport
- port on which server will be boundjava.io.IOException
- if server creation failed.public void start()
public void stop()
protected static void error(com.sun.net.httpserver.HttpExchange ex, java.lang.String message) throws java.io.IOException
java.io.IOException
protected static java.util.HashMap<java.lang.String,java.lang.Object> GET(com.sun.net.httpserver.HttpExchange ex)