Scott Smith > RMI-0.10 > RMI::Server

Download:
RMI-0.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

RMI::Server - service RMI::Client requests from another process

VERSION ^

This docuement describes RMI::Server v0.10.

SYNOPSIS ^

    $s = RMI::Server->new(
        reader => $fh1,
        writer => $fh2,
    );
    $s->run;

    $s = RMI::Server::Tcp->new(
        port => 1234
    );
    $s->run;

    $s = RMI::Server->new(...);
    for (1..3) {
        $s->receive_request_and_send_response;
    }

DESCRIPTION ^

This is the base class for RMI::Servers, which accept requests via an IO handle of some sort, execute code on behalf of the request, and send the return value back to the client.

When the RMI::Server responds to a request which returns objects or references, the proxies are constructed in the client (the data behind the object is not serialized).

When the client sends objects or other references as parameters, proxies are created on the server to represent those objects. It is possible, even likely, that while the server is executing the requested code using those parameters, that the proxies will be the source of counter-requests, leading to the remote client filling a server role temporarily.

See the detailed explanation of remote proxy references in the RMI general documentation, and see RMI::Node for details on how any client and server actually fill both roles.

METHODS ^

new()

 $s = RMI::Server->new(reader => $fh1, writer => $fh2)

This is typically overriden in a specific subclass of RMI::Server to construct the reader and writer according to a particular strategy. It is possible for the reader and the writer to be the same handle, particularly for RMI::Server::Tcp.

receive_request_and_send_response()

 $bool = $

Implemented in the base class for all RMI::Node objects, this handles processing a single request from the reader handle.

run()

 $s->run();

Enter a loop processing RMI requests. This will continue as long as the connection is open.

BUGS AND CAVEATS ^

See general bugs in RMI for general system limitations.

SEE ALSO ^

RMI RMI::Node RMI::Client RMI::Server::Tcp RMI::Server::ForkedPipes

AUTHORS ^

Scott Smith <sakoht@cpan.org>

COPYRIGHT ^

Copyright (c) 2008 - 2009 Scott Smith <sakoht@cpan.org> All rights reserved.

LICENSE ^

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

syntax highlighting: