| POE-Component-Supervisor documentation | view source | Contained in the POE-Component-Supervisor distribution. |
POE::Component::Supervisor::Supervised - A role for supervision descriptors.
# See e.g. POE::Component::Supervisor::Supervised::Proc;
All children supervised by the POE::Component::Supervisor must do this role.
This role provides an API for instantiating POE::Component::Supervisor::Handle as required by the supervisor, corresponding to living instances of the child. The POE::Component::Supervisor::Supervised objects serve as descriptors for these handles, and know how to spawn the actual child.
One of permanent, transient or temporary.
Defaults to transient.
See should_restart.
This attribute should be extended by your class to provide a default for
_inherit_attributes_from_handle_class (and subsequently create_handle) to
work.
Calls new on handle_class with the arguments.
Iterates the inherited attributes and copies them from the $self, and also
passes $self as the child parameter, along with all provided arguments to
construct_handle.
Returns a boolean value, which instructs the supervisor as to whether or not the child should be restarted after exit.
If the child is permanent this always returns true.
If the child is transient this returns true if is_abnormal_exit returns
true.
If the child is temporary this returns false.
Required.
Given exit arguments from the handle, check whether or not the exit was normal or not.
For example POE::Component::Supervisor::Supervised::Proc will by default check if the exit status is 0.
Only applies to transient children.
Required.
Creates a new POE::Component::Supervisor::Handle object for the supervisor.
An alias for spawn by default.
May be overridden if respawning requires cleanup first, or something like that.
Boolean query methods that operatoe on restart_policy.
| POE-Component-Supervisor documentation | view source | Contained in the POE-Component-Supervisor distribution. |