--- /dev/null
+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