| App-Context documentation | Contained in the App-Context distribution. |
App::CallDispatcher::HTTPSimple - synchronous rpc using simple HTTP protocol
use App;
$context = App->context();
$call_dispatcher = $context->service("CallDispatcher"); # or ...
$call_dispatcher = $context->call_dispatcher();
@returnvals = $call_dispatcher->call($service, $name, $method, $args);
A CallDispatcher service facilitates synchronous remote procedure calls. The HTTPSimple does this by formatting a simple HTTP request using GET or POST and parsing the results using a serializer.
A CallDispatcher service facilitates synchronous remote procedure calls. The HTTPSimple does this by formatting a simple HTTP request using GET or POST and parsing the results using a serializer.
* Throws: App::Exception::CallDispatcher * Since: 0.01
* Signature: @returnvals = $call_dispatcher->call($service, $name, $method, $args);
* Param: $service string [in]
* Param: $name string [in]
* Param: $method string [in]
* Param: $args ARRAY [in]
* Return: @returnvals any
* Throws: App::Exception::CallDispatcher
* Since: 0.01
Sample Usage:
@returnvals = $call_dispatcher->call("Repository","db",
"get_rows",["city",{city_cd=>"LAX"},["city_cd","state","country"]]);
* Author: Stephen Adkins <spadkins@gmail.com> * License: This is free software. It is licensed under the same terms as Perl itself.
App::Context|App::Context,
App::Service|App::Service
| App-Context documentation | Contained in the App-Context distribution. |
############################################################################# ## $Id: HTTPSimple.pm 6783 2006-08-11 17:43:28Z spadkins $ ############################################################################# package App::CallDispatcher::HTTPSimple; $VERSION = (q$Revision: 6783 $ =~ /(\d[\d\.]*)/)[0]; # VERSION numbers generated by svn use App; use App::Service; @ISA = ( "App::Service" ); use strict;
############################################################################# # CLASS #############################################################################
############################################################################# # PUBLIC METHODS #############################################################################
############################################################################# # call() #############################################################################
sub call { my ($self, $service, $name, $method, $args) = @_; my $context = $self->{context}; my @returnvals = $context->call($service, $name, $method, $args); }
1;