All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface uhr.core.attract.ServiceHostAide

public interface ServiceHostAide
This serves as an "aide-de-camp" to a ServiceHost. An aide-de-camp is a subordinate acting as a confidential assistant to a superior. This is similar to a delegate. The benefit is fewer methods in the ServiceHost interface and greater reuse.


Method Index

 o addItem(ServiceItem)
Adds a ServiceItem.
 o addItem(String, String, String, Object)
Creates and adds a ServiceNeed with the type, service and single attribute.
 o enumerateServiceItems()
Returns the host's needs.
 o getServiceItem(Attractor)
Returns the ServiceItem having the attractor or null if none found.

Methods

 o addItem
 public abstract void addItem(ServiceItem item)
Adds a ServiceItem. The host uses this method to populate the aide with items, which MUST be done before the aide is exposed. This method also adds the host to the item.

Parameters:
item - describes the service offered.
 o addItem
 public abstract ServiceItem addItem(String type,
                                     String attributeName,
                                     String attributeValue,
                                     Object service)
Creates and adds a ServiceNeed with the type, service and single attribute. This is a convenience method.

Parameters:
type - the service type.
attributeName - the attribute name.
attributeValue - the attribute value.
service - the actual service, which must be of the type.
Returns:
the item created.
 o enumerateServiceItems
 public abstract Enumeration enumerateServiceItems()
Returns the host's needs. There is usually at least one.

Returns:
all the host's ServiceItems. The order is irrelevant.
 o getServiceItem
 public abstract ServiceItem getServiceItem(Attractor attractor)
Returns the ServiceItem having the attractor or null if none found.

Parameters:
attractor - identifies the desired ServiceItem.
Returns:
the desired item or null.

All Packages  Class Hierarchy  This Package  Previous  Next  Index