| POE-Component-Supervisor documentation | view source | Contained in the POE-Component-Supervisor distribution. |
POE::Component::Supervisor::Supervised::Session - Helps POE::Component::Supervisor babysit POE sessions.
POE::Component::Supervisor::Supervised::Session->new(
start_callback => sub {
return POE::Session->new(
);
},
);
POE::Component::Supervisor::Supervised::Session->new(
implicit_tracking => 1, # any sessions from _child create events
start_callback => sub {
POE::Component::Foo->spawn(
...
);
},
);
This is a factory object that creates POE::Component::Supervisor::Handle::Session objects.
See also ATTRIBUTES in POE::Component::Supervisor::Handle::Session, all of the documented attributes that apply to handle creation are borrowed by this class.
The class to instantiate.
Defaults to POE::Component::Supervisor::Handle::Session.
Note that attributes are inherited only from
POE::Component::Supervisor::Handle::Session. If your handle class requires
additional attributes, you must subclass your own Supervised variant.
The _inherit_attributes_from_handle_class method can then be invoked on your
subclass to reinherit all the attributes. Read the source of
POE::Component::Supervisor::Supervised for more details.
See also METHODS in POE::Component::Supervisor::Supervised.
Called by POE::Component::Supervisor when a new instance of the child process should be spawned.
Used by should_restart. See POE::Component::Supervisor::Supervised for
details.
Returns true if the error argument is provided (it's added by the handle
when a DIE signal is cought from one of the tracked sessions).
| POE-Component-Supervisor documentation | view source | Contained in the POE-Component-Supervisor distribution. |