All Packages Class Hierarchy This Package Previous Next Index
Class uhr.core.attract.ServiceHostAideStd
java.lang.Object
|
+----uhr.core.attract.ServiceHostAideStd
- public class ServiceHostAideStd
- extends Object
- implements 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.
-
ServiceHostAideStd(ServiceHost)
-
-
addItem(ServiceItem)
- Adds a ServiceItem.
-
addItem(String,
String, String, Object)
- Creates and adds a ServiceNeed with the type, service and single
attribute.
-
enumerateServiceItems()
- Returns the host's attractors.
-
getServiceItem(Attractor)
- Returns the ServiceItem having the attractor or null if
none found.
ServiceHostAideStd
public ServiceHostAideStd(ServiceHost host)
addItem
public 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.
addItem
public 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.
enumerateServiceItems
public Enumeration enumerateServiceItems()
- Returns the host's attractors. There is usually at least one.
- Returns:
- all the host's ServiceItems. The order is
irrelevant.
getServiceItem
public 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