All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface uhr.core.role.PartUser

public interface PartUser
A class may optionally implement this interface to indicate it wants to use other parts. This is an example of the Object User Pattern.

Here "part name" represents a "slot" in a System Tree design. The slot name is the part name. A slot is a plugpoint that has specific published aspects. Currently we define a slot by the part or stub part that's in it. Slots are a concept Steve Alexander has been working on. In the future we expect to have a more true slot oriented design, at which point this interface could properly be named "SlotUser". :-)

This interface sufferd from the part's full dependencies aren't published. We expect to change this to ServiceUser with an attractor approach.


Method Index

 o getPartNamesNeeded()
Returns an array of the part names this part needs to do its work.
 o setPart(String, Object)
Sets a named part, in response to part needs.

Methods

 o getPartNamesNeeded
 public abstract String[] getPartNamesNeeded()
Returns an array of the part names this part needs to do its work.

Returns:
the names of the parts needed.
 o setPart
 public abstract void setPart(String name,
                              Object part)
Sets a named part, in response to part needs.

The part implementing this interface should continue working normally even if this method is called anytime, which can occur if the provided part is being replaced. This means it should keep only a simple reference to the part. If it collaborates only with messages, it need not synchronize anything, since messages will be paused during replacement.

Parameters:
name - the name of the needed part.
part - the needed part.

All Packages  Class Hierarchy  This Package  Previous  Next  Index