class CategoryListener

An instance of a subclass of CategoryListener receives notifications of either the entire list or a subset of Item(s) in an instance of a subclass of Category. More...

Definition#include <sysadm/CategoryListener.h>
InheritsAttrListener
Inherited byChildCategoryListener, ParentCategoryListener
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

An instance of a subclass of CategoryListener receives notifications of either the entire list or a subset of Item(s) in an instance of a subclass of Category. Furthermore, it can receive notifications of changes to the attributes of the Category instance.

A CategoryListener can expect to receive zero or more itemAdded() and attrAdded() calls, followed by an endExists() call followed by zero or more addItem(), changeItem(), removeItem(), attrAdded(), attrChanged and attrRemoved calls. The endExists() call signals that the Category has communicated the entire set of Item(s) discovered in the system to the CategoryListener.

See Category.h for details on how CategoryListener instances can be used with a Category instance.

The base class provides do-nothing implementations of virtual methods which subclasses override.

CategoryListener instances are mostly used by the Category Service, described in sysadmd(1M), to fulfill requests from remote clients. They can also be used by any server-side components that require information from a Category.

 CategoryListener ()

Constructor.

CategoryListener ()

[virtual]

Destructor.

void  itemAdded (const Item& item)

[virtual]

Called by Category to notify current list of Item(s) at the time CategoryListener registers for notifications and when Item(s) are later discovered by Category or added to the system.

void  itemChanged (const Item& oldItem, const Item& newItem)

[virtual]

Called by Category when an Item changes.

void  itemRemoved (const Item& item)

[virtual]

Called by Category when an Item is removed.

void  beginBlockChanges ()

[virtual]

Called by Category prior to a block of changes. For example, Category::replaceItemList() calls beginBlockChanges() before changing the list.

void  endBlockChanges ()

[virtual]

Called by Category after a block of changes. For example, Category::replaceItemList() calls endBlockChanges() after changing the list.

void  endExists ()

[virtual]

Called by Category when it has finished notifying CategoryListener of all Item(s) of a specific type in a system. If the Category has received the endExists() notification from its subclasses before the time the CategoryListener registers for notification, (indicating that the Category subclass has completed discovery of the existing Item(s) of the specific type in the system) it will notify CategoryListener of all the Item(s) in its list and send the endExists() notification. If not, it will send the endExists() notifications when it receives the corresponding notification from its subclasses.

void  attrChanged (const AttrEvent& event)

[virtual]

Called by Category to notify current list of Attribute(s) at the time CategoryListener registers for notifications and when Attribute(s) are later discovered by Category or added.

Reimplemented from AttrListener.


Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36.