Fault::Delegate::List - Internal class for managing a list of delegates.


Fault documentation  | view source Contained in the Fault distribution.

Index


NAME

Top

 Fault::Delegate::List - Internal class for managing a list of delegates.

SYNOPSIS

Top

 use Fault::Delegate::List;
 $self      = Fault::Delegate::List->new (@delegates);
 $bool      = $self->add                 (@delegates);
 @delegates = $self->delegates;
 $bool      = $self->log                 ($msg,@rest);
 $bool      = $self->trans00             ($msg,@rest);
 $bool      = $self->trans01             ($msg,@rest);
 $bool      = $self->trans10             ($msg,@rest);
 $bool      = $self->trans11             ($msg,@rest);

Inheritance

Top

 UNIVERSAL

Description

Top

 Internal class for managing a list of delegates.

Examples

Top

 None.

Class Variables

Top

 None.

Instance Variables

Top

 list      Contains a pointer to a hash of delegate pointers.

Class Methods

Top

$self = Fault::Delegate::List->new(@delegates)

Create an instance of Fault::Delegate::List and initialize it with the contents of @delegates. The list may be null.

If a delegate has an initfaults method, it is executed and the results merged into the current list of active faults.

Instance Methods

Top

$bool = $self->add (@delegates)

Add each member of a list of delegates, that is not already present, to the internal list of delegates. The list may be empty.

A member of the list is included only if it is a pointer to an object that has a log method.

If a delegate has an initfaults method, it is executed and the results merged into the current list of active faults.

@delegates = $self->delegates

Returns a list of delegate objects suitable for iteration. The list may be empty.

$bool = $self->log ($msg,@rest)

Send a message to each delegate for logging.

$bool = $self->trans00 ($msg,@rest)

Send a message to each delegate for 4 state fault monitoring in the case that $msg was in a Fault Clear state previously and still is.

$bool = $self->trans01 ($msg,@rest)

Send a message to each delegate for 4 state fault monitoring in the case that $msg was in a Fault Clear state previously and is now in a Fault Raised state.

$bool = $self->trans10 ($msg,@rest)

Send a message to each delegate for 4 state fault monitoring in the case that $msg was in a Fault Raised state previously but is now in a Fault Clear state.

$bool = $self->trans11 ($msg,@rest)

Send a message to each delegate for 4 state fault monitoring in the case that $msg was in a Fault Raised state previously and still is.

@faults = $self->initfaults

Ask each delegate to return a current list of faults for this process from its persistant storage. Returns an empty list if there are none or the delegate class has no such memory or if it does and is unable to retrieve data from it.

Private Class Method

Top

 None.

Private Instance Methods

Top

 None.

Errors and Warnings

Top

 None.

KNOWN BUGS

Top

 See TODO.

SEE ALSO

Top

 None.

AUTHOR

Top

Dale Amon <amon@vnl.com>


Fault documentation  | view source Contained in the Fault distribution.