
Supervisor::RPC::Server - A RPC interface to the Superviors environment

my $supervisor = Supervisor::Controller->new(
Name => 'supervisor',
Logfile => '/dev/stdout',
Processes => Supervisor::ProcessFactory->load(
Config => 'supervisor.ini',
Supervisor => 'suprvisor',
),
RPC => Supervisor::RPC::Server->new(
Name => 'rpc',
Port => 9505,
Address => 127.0.0.1,
Logfile => '/dev/stdout'
Supervisor => 'supervisor',
)
);
$supervisor->run;

This module allows the supervisor environment to interface with external agents. This is done thru a limited RPC interface. The RPC format is based on JSON-RPC v2.0.

This initializes the module and starts listening for requests. There are five parameters that can be passed. They are the following:
Name - the name of the RPC session. Port - the IP port to listen on (default 9505) Address - the address to bind to (default 127.0.0.1) Logfile - the logfile to use Supervisor - the name of the Controller session.

This method takes the passed process name, creates a data structure and triggers the "stop_process" event in the supervisors context. When the process is stopped, a message is sent back to the client.
This method takes the passed process name, creates a data structure and triggers the "start_process" event in the supervisors context. When the process is started, a message is sent back to the client.
This method takes the passed process name, creates a data structure and triggers the "stat_process" event in the supervisors context. The status of the process is sent back to the client.
This method takes the passed process name, creates a data structure and triggers the "reload_process" event in the supervisors context. When done, a message is sent back to the client.

Supervisor Supervisor::Base Supervisor::Class Supervisor::Constants Supervisor::Controller Supervisor::Log Supervisor::Process Supervisor::ProcessFactory Supervisor::Session Supervisor::Utils Supervisor::RPC::Server Supervisor::RPC::Client

Kevin L. Esteb, <kesteb@wsipc.org>

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.