NAME
Net::RMI::Client - Perl client-side extension for Remote Method Invocation (RMI).
SYNOPSIS
use Net::RMI::Client;
# Initialize the client
@servers = qw(localhost);
$client = new Net::RMI::Client(@servers);
# Refresh it's function list.
$client->pollAllServers();
$result = $client->RM_someFunction(@someParameters));
DESCRIPTION
The client portion of Net::RMI, contains the methods neccessary to find and invoke remote methods. Remote methods can be invoked explicitly via the $client-
RM_someFunction> or implicitly via a more subtly mechanism:
sub AUTOLOAD {
my $function = $AUTOLOAD;
$function =~ s/^.+::(.+)$/RM_$1/;
return $client->$function(@_);
}
someUnusedFunctionName(@someParameters);
As the AUTOLOAD function will catch this attempt, and forward it to the Net::RMI::Client instance (in this example called $client).
METHODS
- AUTOLOAD
-
This function looks for all functions called that begin with "RM_". It then attempt to invoke those methods remotely, by taking all text after the "RM_" and using it as the remote function name.
Parameters: none. Returns: the results of the RMI.
- new
-
The new method creates a new RMI client and defines its initial list of RMI method servers.
Parameters: a list of method servers. Returns: a new instance.
- addServer
-
Adds one or more method servers to the list of servers for this client.
Parameters: a list of method servers. Returns: nothing.
- addServerFunction
-
Adds a specific server, function name pair to the list of available remote methods for this client.
Parameters: a server name and port, function name, function's parameter list and return-type. Returns: nothing.
- getFunction
-
Gets a specific server, function name pair based on function name. If multiple servers provide a function with the same name, they are picked in round-robin fashion.
Parameters: the function name. Returns: the method server's name and port, the function's parameter list and return-type.
- refresh
-
An alias for pollAllServers.
(See Below.)
- pollAllServers
-
Iterates over all method-servers for this client and retrieves the information about all functions available on those servers.
Parameters: none. Returns: nothing.
- pollServer
-
Retrieves all information, including function parameters and return-type, for all functions on a specific method-server.
Parameters: the method-server's name and port. Returns: nothing.
SEE ALSO
Net::RMI, and Net::RMI::Server.
AUTHOR
Stephen Pandich, pandich@yahoo.com
Contact the Author1 POD Error
The following errors were encountered while parsing the POD:
- Around line 368:
'=end' without a target? (Should be "=end html")