All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface uhr.core.attract.ServiceClient

public interface ServiceClient
A ServiceClient represents something using host services and describing those needs with ServiceNeeds. These needs are automatically satisfied in by the use of attractors which the aide provides, or manually by using the lookup the aide has.


Method Index

 o getServiceClientAide()
Returns the aide handling the ServiceClient's attractor work.
 o setServiceNeeded(ServiceNeed, Object)
Sets the service provided by a host and identifed by the need.

Methods

 o getServiceClientAide
 public abstract ServiceClientAide getServiceClientAide()
Returns the aide handling the ServiceClient's attractor work.

Returns:
the aide.
 o setServiceNeeded
 public abstract void setServiceNeeded(ServiceNeed need,
                                       Object service)
Sets the service provided by a host and identifed by the need. This is called by the aide, not an outside class. The aide asserts the need is recognized, so the client need not check that, and keeps a reference to the service for future recall. Thus only the aide's setServiceNeeded(...) method should be called to satisfy a ServiceClient's need.

This method should not be called by any object except the aide.

In some case this will be a replacement call requiring work on the client's part.

See the identical method in the aide.

Parameters:
need - the need that described the service.
service - the attracted service, which must be cast to the type for that service before use.

All Packages  Class Hierarchy  This Package  Previous  Next  Index