JOAP::Proxy::Package::Server

JOAP::Proxy::Package::Server is a base class for Proxies of JOAP Server.
Download

JOAP::Proxy::Package::Server Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Evan Prodromou
  • Publisher web site:
  • http://search.cpan.org/~evan/

JOAP::Proxy::Package::Server Tags


JOAP::Proxy::Package::Server Description

JOAP::Proxy::Package::Server is a base class for Proxies of JOAP Server. JOAP::Proxy::Package::Server is a base class for Proxies of JOAP Server.SYNOPSIS # define the package package MyProxyServer; use JOAP::Proxy::Package::Server; use base qw(JOAP::Proxy::Package::Server); # define remote address MyProxyServer->Address('joap-server.example.net'); # define local classes for classes on server MyProxyServer->ClassProxy({Person => MyProxy::Person, Foo => MyProxy::Foo}); 1; package main; # Get a Jabber connection (you're responsible for this) my $con = get_net_jabber_connection_somehow(); # Set it for all the proxies JOAP::Proxy->Connection($con); # initialize the server my $server = MyProxyServer->get; # read an attribute my $foo = $server->logLevel; # set an attribute $server->logLevel(14); # save changed values $server->save; # refresh attributes from the remote server $server->refresh; # determine which local class represents a remote class my $local = $server->proxy_class('Person@joap-server.example.net');ABSTRACTThis module provides an abstract base class that can be used to create JOAP object server classes. These classes store metadata about the object server in the package, making things a little more efficient.The benefit of using a package to store object server metadata is kinda moot, since there's going to be a small (preferably singleton) number of instances anyways.The main benefit is that the code generator, joappxgen, can put the metadata in the package for you, saving a round-trip to the server for each program invocation. Note that setting up the metadata is a little tricky and error prone; if you set it up by hand, make sure you get all the metadata, or you'll have weird errors. If in doubt, just put in the Address and ClassMap.Additionally, it lets you map local Perl modules to remote classes.Note that you don't have to use the remote object server if you don't want to. You can just talk directly to its classes and instances.The Perl methods are very similar to those for other JOAP::Proxy packages, but they are listed here for completeness.As a usage note, you should set the Connection class attribute of the JOAP::Proxy class before using any of the methods in this package (except maybe Address). See JOAP::Proxy for more information. Requirements: · Perl


JOAP::Proxy::Package::Server Related Software