From 150e62aad688c3143a1a9c2c4c890dd81b91cc54 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Wed, 24 Jun 2009 20:15:53 +0000 Subject: improved docs, added me to the author and copyright list --- lib/Qooxdoo/JSONRPC.pm | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'lib/Qooxdoo/JSONRPC.pm') diff --git a/lib/Qooxdoo/JSONRPC.pm b/lib/Qooxdoo/JSONRPC.pm index 38feef9..bc34bca 100644 --- a/lib/Qooxdoo/JSONRPC.pm +++ b/lib/Qooxdoo/JSONRPC.pm @@ -6,15 +6,18 @@ package Qooxdoo::JSONRPC; # # Copyright: # 2006-2007 Nick Glencross +# 2008-2009 Tobi Oetiker # # License: # LGPL: http://www.gnu.org/licenses/lgpl.html # EPL: http://www.eclipse.org/org/documents/epl-v10.php -# See the LICENSE file in the project's top-level directory for details. +# This software, the Qooxdoo RPC Perl backend, is licensed under the same +# terms as Qooxdoo itself, as included in `LICENSE.Qooxdoo' # # Authors: # * Nick Glencross - +# * Tobi Oetiker +# # The JSON-RPC implementation. # Use perldoc on this file to view documentation @@ -813,6 +816,8 @@ sub blessed_date $millisecond); } +1; + __END__ ############################################################################## @@ -924,11 +929,11 @@ HTTP headers, and the JSON module to manipulate the JSON body. A simple, but typical exchange might be: -client->server: + client->server: {"service":"qooxdoo.test","method":"echo","id":1,"params":["Hello"],"server_data":null} -server->client: + server->client: {"id":1,"result":"Client said: [Hello]"} @@ -942,7 +947,7 @@ then execute the function Qooxdoo::Services::qooxdoo::test::echo with the supplied arguments. The function will receive the error object as the first argument, and -subsequent arguments are supplied by the remote call. Your method call +subsequent arguments as supplied by the remote call. Your method call would therefore start with something equivalent to: my $error = shift; @@ -1032,10 +1037,10 @@ There is also some infrastructure to implement access control. Before each method call, the C method of the service is called. Depending on the response from C the actual method will be called, or an error is returned to the remote caller. -The example in the synopys shows how to use that for implementing an -actuall authentication process. +The example in the synopsis shows how to use that for implementing an +authentication process. -C must return the following access levels +C must return one of the following access levels =over @@ -1063,16 +1068,14 @@ Access is denied =head2 Persistant Data in the Session module -Methods get access to the session as a parameter of the error object. -Session allows to easily store persistant data in methods. Since -the session module writes all parameters in one go, this can -result in a race condition when two instances store data. +Methods get access to the session handle as a parameter of the error object. +Session allows to easy storage of persistant data. Since the session module +writes all parameters in one go, this can result in a race condition when +two instances store data. =head1 AUTHOR -Nick Glencross Enick.glencross@gmail.comE +Nick Glencross Enick.glencross@gmail.comE, +Tobi Oetiker Etobi@oetiker.chE =cut - - -1; -- cgit v1.2.3-24-g4f1b