NAME

Apache2::JSONRPC::Session - Dispatcher class for session aware JSONRPC Objects

SYNOPSIS

package MyDispatch;

use Apache2::JSONRPC::Session; use base qw(Apache2::JSONRPC::Session);

# optional custom session rebuild sub init_session { my ($class,%args) = @_; # ... regenerate session $args{session} = $session; return %args; }

NOTE

The ::Session portions of CGI::JSONRPC are unmaintained and may change or disappear without notice (probably change...)

DESCRIPTION

Apache2::JSONRPC::Dispatcher receives JSONRPC class method calls and translates them into perl object method calls. Here's how it works:

This package works exactly the same as the Apache2::JSONRPC package with the exception that it calls it's method init_session prior to dispatching the call. You should use this method to rebuild the users session.

FUNCTIONS

Refer the the Apache2::JSONRPC for a full discussion of this API, only the extentions to that interface will be discusses here.

init_session(%arguments)

Will be called from the constructor just prior to creating the dispatcher object. %arguments contains the arguments passed into the dispatch or new method and should be modified and returned as the resulting hash will be blessed and returned from new. Rebuild sessions should be stored into the passed hash with the key session.

Note that the request object should alreday be stored into the %arguments variable for your use in rebuilding the session.

AUTHOR

Tyler "Crackerjack" MacDonald <japh@crackerjack.net> and David Labatte <buggyd@justanotherperlhacker.com>

LICENSE

Copyright 2006 Tyler "Crackerjack" MacDonald <japh@crackerjack.net>

This is free software; You may distribute it under the same terms as perl itself.

SEE ALSO

The "examples/httpd.conf" file bundled with the distribution shows how to create a new JSONRPC::Dispatcher-compatible class, and also shows a rather hacky method for making an existing class accessable from JSON.

Apache2::JSONRPC