summaryrefslogtreecommitdiffstats
path: root/src/uscxml/server/InterpreterServlet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/server/InterpreterServlet.cpp')
-rw-r--r--src/uscxml/server/InterpreterServlet.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/uscxml/server/InterpreterServlet.cpp b/src/uscxml/server/InterpreterServlet.cpp
index e537275..99b81b2 100644
--- a/src/uscxml/server/InterpreterServlet.cpp
+++ b/src/uscxml/server/InterpreterServlet.cpp
@@ -1,5 +1,6 @@
#include "InterpreterServlet.h"
#include "uscxml/Interpreter.h"
+#include <glog/logging.h>
namespace uscxml {
@@ -17,6 +18,12 @@ InterpreterServlet::InterpreterServlet(Interpreter* interpreter) {
_path = path.str();
}
+boost::shared_ptr<IOProcessorImpl> InterpreterServlet::create(Interpreter* interpreter) {
+ // we instantiate directly in Interpreter
+ boost::shared_ptr<IOProcessorImpl> io = boost::shared_ptr<InterpreterServlet>(new InterpreterServlet(interpreter));
+ return io;
+}
+
void InterpreterServlet::httpRecvRequest(const HTTPServer::Request& req) {
tthread::lock_guard<tthread::recursive_mutex> lock(_mutex);
@@ -31,4 +38,15 @@ void InterpreterServlet::httpRecvRequest(const HTTPServer::Request& req) {
_interpreter->receive(event);
}
+Data InterpreterServlet::getDataModelVariables() {
+ Data data;
+ assert(_url.length() > 0);
+ data.compound["location"] = Data(_url, Data::VERBATIM);
+ return data;
+}
+
+void InterpreterServlet::send(const SendRequest& req) {
+ LOG(ERROR) << "send not supported by http iorprocessor, use the fetch element";
+}
+
} \ No newline at end of file