GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Simple::AnyRemote(3) User Contributed Perl Documentation Simple::AnyRemote(3)

RPC::Simple::AnyRemote - Perl base class for a remote object accessible by RPC

  package myClass ;
  use vars qw(@ISA @RPC_SUB);
  use RPC::Simple::AnyRemote;

  @ISA=('RPC::Simple::AnyRemote') ;
  @RPC_SUB = qw(localMethod);

This class must be inherited by the user's class actually performing the remote functions.

Note that any user defined method which can be called by the local object must be able to handle the following optionnal parameters :

'callback' => code_reference

Usually, the methods will be like :

 sub remoteMethod
 {
   my $self = shift ;
   my $param = shift ;
   my $callback ;

   if ($param eq 'callback')
     {
       # callback required
       $callback = shift          
     }

   # user code

   # can call a method from local object
   $self->localMethod("Hey, remoteMethod was called !!");

   # when the user code is over
   return unless defined $callback ;

   &$callback("Hello local object" ) ;
 }

controller_ref is the RPC::Simple::ObjectHandler object actually controlling this instance.

If you overload 'new', don't forget to call also the inherited 'new' method.

When this method is called (generally through perl mechanism), the call will be forwarded with all parameter to the local object. Note that if the remote method name is not declated in the @RPC_SUB array, AnyLocal will try to autoload this mehtod.

Note that this method is not able to handle sub_reference and call back mechanism is not possible fromthis side.

returns self.

AnyRemote will create the following instance variables:

RPC::Simple::ObjectHandler object reference

Store the pwd of the object during its creation.

    Current Maintainer
    Clint Edwards <cedwards@mcclatchyinteractive.com>

    Original
    Dominique Dumont, <Dominique_Dumont@grenoble.hp.com>

perl(1), RPC::Simple::AnyLocal(3)
2006-05-31 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.