| Pots documentation | view source | Contained in the Pots distribution. |
Pots::Thread::MethodServer - Perl ObjectThreads server class for exposing classes to other threads.
use Pots::Thread::MethodServer;
my $ms = Pots::Thread::MethodServer(cclass => 'Some::Class');
$ms->start();
my $cli = $ms->client();
$cli->method1($arg1);
$cli->method2();
$ms->stop();
This class starts a thread and exposes an object to other threads through a
Pots::Thread::MethodClient object. Using that client object, you can call
methods as if your were using a locally created object.
All method calls are transparently forwarded to the server thread.
This class is a subclass of Pots::Thread.
Creates a new thread which will load and instantiate an object of class "Some::Class".
Following the behavior of the Pots::Thread class, you must call "start()"
to start the server thread.
Calling this method will stop the server thread.
This method returns an object of class Pots::Thread::MethodClient, which allows
you to transparently call methods of the "Some::Class" object in the server
thread.
Remy Chibois <rchibois at free.fr>
Copyright (c) 2004 Remy Chibois. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Pots documentation | view source | Contained in the Pots distribution. |