NAME
Supervisor::RPC::Client - The client interface to the Supervisors environment
SYNOPSIS
use Supervisor::RPC::Client;
my $rpc = Supervisor::RPC::Client->new()
my $result = $rpc->start('sleeper');
DESCRIPTION
This is the client module for external access to the Supervisor. It provides methods to start/stop/reload and retrieve the status of managed processes.
METHODS
- new
-
This initilaize the module and can take two parameters.
Example: my $rpc = Supervisor::RPC::Client->new( -port => 9505, -address => 'localhost' };
- start
-
This method will start a managed process. It takes one parameter, the name of the process, and returns "started" if successful.
Example: my $result = $rpc->start('sleeper');
- stop
-
This method will stop a managed process. It takes one parameter, the name of the process, and returns "stopped" if successful.
Example: my $result = $rpc->stop('sleeper');
- status
-
This method will do a "stat" on a managed process. It takes one parameter, the name of the process, and returns "alive" if the process is running or "dead" if the process is not.
- reload
-
This method will attempt to "reload" a managed process. It takes one parameter, the name of the process. It will return "reloaded".
Example: my $result = $rpc->reload('sleeper');
SEE ALSO
Supervisor::Base
Supervisor::Class
Supervisor::Constants
Supervisor::Controller
Supervisor::Log
Supervisor::Process
Supervisor::ProcessFactory
Supervisor::Session
Supervisor::Utils
Supervisor::RPC::Server
Supervisor::RPC::Client
AUTHOR
Kevin L. Esteb, <kesteb@wsipc.org>
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.