--- /dev/null
+package org.simantics.databoard.channel;\r
+\r
+import java.util.Collection;\r
+\r
+import org.simantics.databoard.binding.mutable.Variant;\r
+\r
+/**\r
+ * Command channel is a request-response channel. All operations are asynchronous.\r
+ * This interface is intended to be used by channel clients. \r
+ * For each callable command there is a commandId and specified datatype for request and error.\r
+ *\r
+ * @author Toni Kalajainen <toni.kalajainen@iki.fi>\r
+ */\r
+public interface CommandChannel {\r
+ \r
+ /**\r
+ * Invoke a service request. A asynchronous result object is returned \r
+ * at-once. <p> \r
+ * \r
+ * @param commandId command identifier\r
+ * @param request the request object\r
+ * @return asynchrouns result object\r
+ */\r
+ AsyncRequest invoke( Variant commandId, Variant request );\r
+ \r
+ /**\r
+ * Get all callable commands of the channel.\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