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

Interface COM.ibm.jaws.mofw.NameBaseCollection

public interface NameBaseCollection
extends Object
extends KeyedCollection, Manageable, IdentityDelegator, Dependent, Lifecycle
A NameBaseCollection is a BaseCollection that allows the client to explicitly specify a key in the createManaged() signitures.

Method Index

 o createFromCopy(Object, String, Manageable, String)
Use this method to add a new Managed object to this BaseCollection initialized with data from the object passed in.
 o createFromData(Object, String, InputEDStream, String)
Use this method to add a new Managed object to this BaseCollection and initialize it with "generic" data provided in an InputEDStream

If for any reason, the BaseCollection cannot create the Managed object, it returns null.

 o createFromDefault(Object, String, String)

Methods

 o createFromCopy
  public abstract Managed createFromCopy(Object creator,
                                         String key,
                                         Manageable copy,
                                         String classKey) throws InvalidKeyError, RequestedInterfaceError
Use this method to add a new Managed object to this BaseCollection initialized with data from the object passed in. In effect, this method transforms a Manageable object into a Managed object by creating a new identity for it.

This method associates an client-provided Identifier key with the Managed object that is unique within the target NameBaseCollection.

If for any reason, the BaseCollection cannot create the Managed object, it returns null.

Parameters:
object - is an Manageable object containing the data used to initialize the created Managed object. After this call the BaseCollection "owns" the passed in object, and the caller should forget its reference to the object passed in (use the return value instead).

The BaseCollection either may use the object as the internally cached version of the Managed object, or may just get the data out of the object and throw the object away. In either case, the object needs to support the externalizeToStream() and interalizeFromStream() methods.

interfaceName - is an optional string indicating the interface for the new Managed object.
key - is the user-provided Identifier key.
Returns:
a Managed object that should be used in place of the object passed in.
Throws: RequestedInterfaceError
is raised when the BC cannot return an object of the interface requested.
 o createFromData
  public abstract Managed createFromData(Object creator,
                                         String key,
                                         InputEDStream initialData,
                                         String classKey) throws InvalidKeyError, EDStreamFormatError, RequestedInterfaceError
Use this method to add a new Managed object to this BaseCollection and initialize it with "generic" data provided in an InputEDStream

If for any reason, the BaseCollection cannot create the Managed object, it returns null.

Parameters:
initialData - the InputEDStream containing the initial data for the newly created Managed object.
key - is the user-provided Identifier key.
interfaceName - is an optional string used to specify the expected interface for the new Managed object (useful in building proxies without any network traffic until a method call is made on the returned object).
Returns:
a Managed object that should be used in place of the object passed in.
Throws: EDStreamFormatError
is raised when the Input Stream does not contain the essential data needed to initialize an object in this BaseCollection of the interface requested.
Throws: RequestedInterfaceError
is raised when the BC cannot return an object of the interface requested.
 o createFromDefault
  public abstract Managed createFromDefault(Object creator,
                                            String key,
                                            String classKey) throws InvalidKeyError, RequestedInterfaceError

All Packages  Class Hierarchy  This Package  Previous  Next  Index