]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 package org.simantics.databoard.channel;\r
2 \r
3 import org.simantics.databoard.binding.mutable.Variant;\r
4 import org.simantics.databoard.type.Datatype;\r
5 \r
6 /**\r
7  * This class carries a specification for a single command. \r
8  *\r
9  * @author Toni Kalajainen <toni.kalajainen@iki.fi>\r
10  */\r
11 public class CommandSpec {\r
12 \r
13         /** Well-known id of the service */\r
14         public final Variant commandId;\r
15         \r
16         /** Description of the request data. Typically a record type. */\r
17         public final Datatype requestType;\r
18         \r
19         /** Description of the response data. Typically a record type. */\r
20         public final Datatype responseType;\r
21         \r
22         /** Description of the error data. Typically a union type. */\r
23         public final Datatype errorType;\r
24         \r
25         public CommandSpec(Variant commandId, Datatype requestType, Datatype responseType, Datatype errorType) {\r
26                 this.commandId = commandId;\r
27                 this.requestType = requestType;\r
28                 this.responseType = responseType;\r
29                 this.errorType = errorType;\r
30         }\r
31         \r
32 }\r