Author: nfilotto
Date: 2010-10-11 12:33:49 -0400 (Mon, 11 Oct 2010)
New Revision: 3291
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml
Log:
EXOJCR-967: Doc improved
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml
===================================================================
---
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml 2010-10-11
15:59:50 UTC (rev 3290)
+++
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml 2010-10-11
16:33:49 UTC (rev 3291)
@@ -199,9 +199,10 @@
proposed by default. This command will dynamically execute a method on a
given object.</para>
- <programlisting>// Register the command first
+ <programlisting>// Register the command first (to be done before that the
RPCService has been started)
RemoteCommand commandGetName = rpcService.registerCommand(new
SingleMethodCallCommand(myService, "getName"));
-// Execute the command on the coordinator
+...
+// Execute the command on the coordinator (can be done only after having started the
RPCService)
String name = rpcService.executeCommandOnCoordinator(commandGetName, true);
// Print the name
System.out.println("Name : " + name);</programlisting>
@@ -212,8 +213,8 @@
<listitem>
<para>Register a <emphasis>SingleMethodCallCommand</emphasis>
that
will call <emphasis>getName()</emphasis> on the Object
- <emphasis>myService</emphasis> anytime the command will be
- executed.</para>
+ <emphasis>myService</emphasis> anytime the command will be executed.
+ </para>
</listitem>
<listitem>
@@ -226,5 +227,24 @@
<para>Print the name got from the coordinator</para>
</listitem>
</orderedlist>
+
+ <note>
+ <para>As any <emphasis>RemoteCommand</emphasis>, it has to be
registered
+ before being executed and before the <emphasis>RPCService</emphasis>
is
+ launched.</para>
+ </note>
+
+ <note>
+ <para>As any <emphasis>RemoteCommand</emphasis>, the command can
be
+ executed only once the <emphasis>RPCService</emphasis> is
+ launched.</para>
+ </note>
+
+ <note>
+ <para>The <emphasis>SingleMethodCallCommand</emphasis> only allow
public
+ methods, if you try to register a non public method an
+ <emphasis>RPCException</emphasis> will be thrown at creation
+ level.</para>
+ </note>
</section>
</chapter>
Show replies by date