cvsuser     04/02/27 06:12:22

  Modified:    App-Context/lib/App CallDispatcher.pm
  Log:
  default call dispatcher is now a real local dispatcher, calling $context->call() on 
the local context
  
  Revision  Changes    Path
  1.4       +17 -12    p5ee/App-Context/lib/App/CallDispatcher.pm
  
  Index: CallDispatcher.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Context/lib/App/CallDispatcher.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- CallDispatcher.pm 22 Mar 2003 04:04:34 -0000      1.3
  +++ CallDispatcher.pm 27 Feb 2004 14:12:22 -0000      1.4
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: CallDispatcher.pm,v 1.3 2003/03/22 04:04:34 spadkins Exp $
  +## $Id: CallDispatcher.pm,v 1.4 2004/02/27 14:12:22 spadkins Exp $
   #############################################################################
   
   package App::CallDispatcher;
  @@ -46,7 +46,7 @@
   
   =item * Class: App::CallDispatcher
   
  -=item * Class: App::CallDispatcher::Local
  +=item * Class: App::CallDispatcher::HTTPSimple
   
   =item * Class: App::CallDispatcher::SOAP
   
  @@ -111,25 +111,30 @@
   
   =head2 call()
   
  -    * Signature: $call_dispatcher->call($request, $response);
  -    * Signature: $response = $call_dispatcher->call($request);
  -    * Signature: $response = $call_dispatcher->call(%named);
  -    * Param:     $request           ref   [in]
  -    * Param:     $response          ref   [out]
  -    * Return:    $response          ref
  +    * 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: 
   
  -    $call_dispatcher->call($request, $response);
  -    $response = $call_dispatcher->call($request);
  -    $response = $call_dispatcher->call(%named);
  +    @returnvals = $call_dispatcher->call("Repository","db",
  +        "get_rows",["city",{city_cd=>"LAX"},["city_cd","state","country"]]);
  +
  +The default call dispatcher is a local call dispatcher.
  +It simply passes the call() on to the local context for execution.
  +It results in an in-process method call rather than a remote method call.
   
   =cut
   
   sub call {
  -    my $self = shift;
  +    my ($self, $service, $name, $method, $args) = @_;
  +    my $context = $self->{context};
  +    my @returnvals = $context->call($service, $name, $method, $args);
   }
   
   #############################################################################
  
  
  

Reply via email to