NAME

Supervisor::Session - Base class for all POE Sessions.

SYNOPSIS

my $session = Supervisor::Session->new(
    Name    => 'name',
    Logfile => 'filename.log'
);

DESCRIPTION

This module provides an object based POE session. This object will already have these events/methods defined.

_session_start

This event will run for the initial POE "_start" event. It will define a alias for the session. The session's alias will use the Name parameter. The logging subsystem will be initialized and use the Logfile parameter as the basis for the logfile's name. When done it will trigger the "_session_init" event.

_session_init

This event will call the objects _initialize() method. When this method returns it will trigger the "startup" event.

_session_stop

This event will be called during the POE "_stop" event. All it does is call the _cleanup() method.

_session_shutown

This event will called during the POE "shutdown" event. All it does is call the _cleanup() method.

The following events need to be defined by your object to do something useful.

startup

This event should start whatever processing the session will do.

METHODS

_initialize

This is where the object should then do whatever initialization it needs to do. This initialization may include defining additional events.

_cleanup

This method should perform cleanup actions for the session.

SEE ALSO

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

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.