summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2009-06-24 22:15:53 +0200
committerTobi Oetiker <tobi@oetiker.ch>2009-06-24 22:15:53 +0200
commit150e62aad688c3143a1a9c2c4c890dd81b91cc54 (patch)
treea6edc8f3599d22eaaa37620ee3c0a2e7245f7a82 /lib
parent80c593387051f0a7c72e44dc855d8ca5459a73b9 (diff)
downloadsmokeping-150e62aad688c3143a1a9c2c4c890dd81b91cc54.tar.gz
smokeping-150e62aad688c3143a1a9c2c4c890dd81b91cc54.tar.xz
improved docs, added me to the author and copyright list
Diffstat (limited to 'lib')
-rw-r--r--lib/Qooxdoo/JSONRPC.pm35
1 files changed, 19 insertions, 16 deletions
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<GetAccessibility> method of the service is
called. Depending on the response from C<GetAccessibility> 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<GetAccessibility> must return the following access levels
+C<GetAccessibility> 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 E<lt>nick.glencross@gmail.comE<gt>
+Nick Glencross E<lt>nick.glencross@gmail.comE<gt>,
+Tobi Oetiker E<lt>tobi@oetiker.chE<gt>
=cut
-
-
-1;