Interface COM.ibm.jaws.mofw.Dependent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface COM.ibm.jaws.mofw.Dependent

public interface Dependent
extends Object
Implementing the Dependent interface indicates that the object's implementation depends on other objects that are not part of its essential data (ED). To gain access to such objects, the Object Provider (OP) implements the Dependent interface and documents one or more key-interface pairs, each of which indicates a key to be used to resolve on the dependent context to gain access to an object with the indicated interface. Some examples are getting the Dependent object's BaseCollection, getting the Dependent object's root BaseCollection, getting a BaseCollection for objects that need to be created or resolved by the Dependent object, getting an object that is the same for all the Dependent objects in the same BaseCollection (it would be inefficient to have this object's reference in every Dependent object's ED), etc.

If a specialized constructor is provided for a Dependent object that needs the dependent context for initialization, you should include it in the constructor signature.

The use of this interface eliminates the need for other interfaces between the code managing the object and the object managed, although there is still an issue about how the dependency names and types will be communicated (see the EDS discussion in Manageable).

Some dependencies are standard, so that

The only standard dependency we have determined so far is the following:

   - binding name=MOFW::rootBase 
   - interfaceName=COM.ibm.jaws.mofw.BaseCollection
That is, any Dependent object can find the root BaseCollection via 
    BaseCollection rootBC = 
                  (BaseCollection)dependentContext.resolve(
                           "MOFW::rootBase", 
                           "COM.ibm.jaws.mofw.BaseCollection"); 

Method Index

 o setDependentContext(KeyedCollection)
Use this method to indicate a context through which an object's dependencies can be located.

Methods

 o setDependentContext
  public abstract void setDependentContext(KeyedCollection context)
Use this method to indicate a context through which an object's dependencies can be located.
Parameters:
context - a KeyedCollection that can be used by the the object in order to resolve to various services.

All Packages  Class Hierarchy  This Package  Previous  Next  Index