]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/src/org/simantics/databoard/channel/CommandSpec.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / channel / CommandSpec.java
diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/CommandSpec.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/CommandSpec.java
new file mode 100644 (file)
index 0000000..2763c59
--- /dev/null
@@ -0,0 +1,32 @@
+package org.simantics.databoard.channel;\r
+\r
+import org.simantics.databoard.binding.mutable.Variant;\r
+import org.simantics.databoard.type.Datatype;\r
+\r
+/**\r
+ * This class carries a specification for a single command. \r
+ *\r
+ * @author Toni Kalajainen <toni.kalajainen@iki.fi>\r
+ */\r
+public class CommandSpec {\r
+\r
+       /** Well-known id of the service */\r
+       public final Variant commandId;\r
+       \r
+       /** Description of the request data. Typically a record type. */\r
+       public final Datatype requestType;\r
+       \r
+       /** Description of the response data. Typically a record type. */\r
+       public final Datatype responseType;\r
+       \r
+       /** Description of the error data. Typically a union type. */\r
+       public final Datatype errorType;\r
+       \r
+       public CommandSpec(Variant commandId, Datatype requestType, Datatype responseType, Datatype errorType) {\r
+               this.commandId = commandId;\r
+               this.requestType = requestType;\r
+               this.responseType = responseType;\r
+               this.errorType = errorType;\r
+       }\r
+       \r
+}\r