]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/src/org/simantics/databoard/channel/ServiceHandler.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / channel / ServiceHandler.java
diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/ServiceHandler.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/ServiceHandler.java
new file mode 100644 (file)
index 0000000..8d99ac8
--- /dev/null
@@ -0,0 +1,32 @@
+package org.simantics.databoard.channel;\r
+\r
+import java.util.Collection;\r
+\r
+/**\r
+ * Server interface of command channel. <p>\r
+ * \r
+ * For each callable command there is a well-known commandId and datatype. <p>\r
+ *\r
+ * @author Toni Kalajainen <toni.kalajainen@iki.fi>\r
+ */\r
+public interface ServiceHandler {\r
+\r
+       /**\r
+        * Handle service request from the client. The implementation may handle\r
+        * the service at once or later, even in another thread. The result is\r
+        * written to the asynchronous result object. <p>\r
+        * \r
+        * @param request\r
+        */\r
+       void handleRequest( ServiceRequest request );\r
+       \r
+       /**\r
+        * Get all callable commands handled by this service handler.\r
+        * This result is list of command specifications. For each command there is\r
+        * unique identification, result type and error type.  \r
+        * \r
+        * @return commands\r
+        */\r
+       Collection<CommandSpec> getCommands();\r
+       \r
+}\r