X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc-isv%2Fdoc%2Frpc.mediawiki;h=eda3bfdfd7fde70f59b2d99c26d9d392c8b547e5;hb=e5a79f44f9d6ce5f38fb61c5db0d9af0a1db35a9;hp=8e209e3016c2a81446de8519692ee7bc7b40dcb9;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src-isv/doc/rpc.mediawiki b/bundles/org.simantics.databoard/src-isv/doc/rpc.mediawiki index 8e209e301..eda3bfdfd 100644 --- a/bundles/org.simantics.databoard/src-isv/doc/rpc.mediawiki +++ b/bundles/org.simantics.databoard/src-isv/doc/rpc.mediawiki @@ -1,55 +1,55 @@ -=Remote Procedure Call= -Utilities [../javadoc/org/simantics/databoard/method/Server.html|Server] and [../javadoc/org/simantics/databoard/method/Client.html|Client] put MethodInterface over TCP Socket. -
-    Server myServer      = new Server(8192, mi);
-    MethodInterface mi   = new Client("localhost", 8192);
-
- -MethodInterface with Server and Client together forms a Remote Procedure Call (RPC) mechanism. -
-    public interface MyInterface { String helloWorld(String msg); }
-    
-    [Server]
-    MethodInterface mi   = Methods.bindInterface( MyInterface.class, myObject );
-    Server myServer      = new Server(8192, mi);
-    
-    [Client]
-    MethodInterface mi   = new Client("localhost", 8192);
-    MyInterface myObject = Methods.createProxy( MyInterface.class, mi );
-
- -==Interface Types== -There are interfaces, method types and method type definitions. -Interface type describes a software interface. It is a collection of methods type definitions. -Method type is an unnamed function with the following properties : Response Type, Request Type and ErrorType; where Response Type is any Data Type, Request Type is a Record and Error Type is an Union. -Method type definition is nominal method description. - -The respective Java classes are: -*[../javadoc/org/simantics/databoard/method/Interface.html|Interface] -*[../javadoc/org/simantics/databoard/method/MethodTypeDefinition.html|MethodTypeDefinition] -*[../javadoc/org/simantics/databoard/method/MethodType.html|MethodType] - -In java InterfaceType description can be created with one of the following methods: -* Implementing InterfaceType -* Reading an Java Interface Class using reflection -
-    Interface it = new Interface( ... methodDefinitions );
-    Interface it = getInterface( MyInterface.class );
-
- -[../javadoc/org/simantics/databoard/method/MethodInterface.html|MethodInterface] is a binding of an -Java Instance and an Interface Type. It decouples the method invocation from the object. - -MethodInterface can be created with the following methods: -* Implementation -* Reflection -
-    MethodInterface mi   = new MethodInterface() {...}
-    MethodInterface mi   = Datatypes.bindInterface( MyInterface.class, myObject );
-
- -Utilities Datatypes.createProxy() and Datatypes.bindInterface() adapt between MethodInterface and Java Instance. -
-    MethodInterface mi   = Datatypes.bindInterface( MyInterface.class, myObject );
-    MyInterface myObject = Datatypes.createProxy( MyInterface.class, mi );
-
+=Remote Procedure Call= +Utilities [../javadoc/org/simantics/databoard/method/Server.html|Server] and [../javadoc/org/simantics/databoard/method/Client.html|Client] put MethodInterface over TCP Socket. +
+    Server myServer      = new Server(8192, mi);
+    MethodInterface mi   = new Client("localhost", 8192);
+
+ +MethodInterface with Server and Client together forms a Remote Procedure Call (RPC) mechanism. +
+    public interface MyInterface { String helloWorld(String msg); }
+    
+    [Server]
+    MethodInterface mi   = Methods.bindInterface( MyInterface.class, myObject );
+    Server myServer      = new Server(8192, mi);
+    
+    [Client]
+    MethodInterface mi   = new Client("localhost", 8192);
+    MyInterface myObject = Methods.createProxy( MyInterface.class, mi );
+
+ +==Interface Types== +There are interfaces, method types and method type definitions. +Interface type describes a software interface. It is a collection of methods type definitions. +Method type is an unnamed function with the following properties : Response Type, Request Type and ErrorType; where Response Type is any Data Type, Request Type is a Record and Error Type is an Union. +Method type definition is nominal method description. + +The respective Java classes are: +*[../javadoc/org/simantics/databoard/method/Interface.html|Interface] +*[../javadoc/org/simantics/databoard/method/MethodTypeDefinition.html|MethodTypeDefinition] +*[../javadoc/org/simantics/databoard/method/MethodType.html|MethodType] + +In java InterfaceType description can be created with one of the following methods: +* Implementing InterfaceType +* Reading an Java Interface Class using reflection +
+    Interface it = new Interface( ... methodDefinitions );
+    Interface it = getInterface( MyInterface.class );
+
+ +[../javadoc/org/simantics/databoard/method/MethodInterface.html|MethodInterface] is a binding of an +Java Instance and an Interface Type. It decouples the method invocation from the object. + +MethodInterface can be created with the following methods: +* Implementation +* Reflection +
+    MethodInterface mi   = new MethodInterface() {...}
+    MethodInterface mi   = Datatypes.bindInterface( MyInterface.class, myObject );
+
+ +Utilities Datatypes.createProxy() and Datatypes.bindInterface() adapt between MethodInterface and Java Instance. +
+    MethodInterface mi   = Datatypes.bindInterface( MyInterface.class, myObject );
+    MyInterface myObject = Datatypes.createProxy( MyInterface.class, mi );
+