org.eclipse.ecf.core
Interface ISharedObjectFactory

All Known Implementing Classes:
SharedObjectFactory

public interface ISharedObjectFactory

Container factory contract SharedObjectFactory for default implementation.


Method Summary
 SharedObjectTypeDescription addDescription(SharedObjectTypeDescription description)
           
 boolean containsDescription(SharedObjectTypeDescription description)
          Check to see if a given named description is already contained by this factory
 ISharedObject createSharedObject(SharedObjectTypeDescription typeDescription, java.lang.String[] argTypes, java.lang.Object[] args)
          Create ISharedObject instance.
 ISharedObject createSharedObject(java.lang.String descriptionName)
          Create ISharedObject instance.
 ISharedObject createSharedObject(java.lang.String descriptionName, java.lang.Object[] args)
          Create ISharedObject instance.
 ISharedObject createSharedObject(java.lang.String descriptionName, java.lang.String[] argsTypes, java.lang.Object[] args)
          Create ISharedObject instance.
 SharedObjectTypeDescription getDescriptionByName(java.lang.String name)
          Get the known SharedObjectTypeDescription given it's name.
 java.util.List getDescriptions()
          Get a collection of the SharedObjectTypeDescriptions currently known to this factory.
 SharedObjectTypeDescription removeDescription(SharedObjectTypeDescription scd)
          Remove given description from set known to this factory.
 

Method Detail

addDescription

SharedObjectTypeDescription addDescription(SharedObjectTypeDescription description)

getDescriptions

java.util.List getDescriptions()
Get a collection of the SharedObjectTypeDescriptions currently known to this factory. This allows clients to query the factory to determine what if any other SharedObjectTypeDescriptions are currently registered with the factory, and if so, what they are.

Returns:
List of SharedObjectTypeDescription instances

containsDescription

boolean containsDescription(SharedObjectTypeDescription description)
Check to see if a given named description is already contained by this factory

Parameters:
description - the SharedObjectTypeDescription to look for
Returns:
true if description is already known to factory, false otherwise

getDescriptionByName

SharedObjectTypeDescription getDescriptionByName(java.lang.String name)
                                                 throws SharedObjectCreateException
Get the known SharedObjectTypeDescription given it's name.

Parameters:
name -
Returns:
SharedObjectTypeDescription found
Throws:
SharedObjectCreateException

createSharedObject

ISharedObject createSharedObject(SharedObjectTypeDescription typeDescription,
                                 java.lang.String[] argTypes,
                                 java.lang.Object[] args)
                                 throws SharedObjectCreateException
Create ISharedObject instance. Given a SharedObjectTypeDescription object, a String [] of argument types, and an Object [] of parameters, this method will

Parameters:
typeDescription - the SharedObjectTypeDescription to use to create the instance
argTypes - a String [] defining the types of the args parameter
args - an Object [] of arguments passed to the createInstance method of the ISharedObjectInstantiator
Returns:
a valid instance of ISharedObject
Throws:
SharedObjectCreateException

createSharedObject

ISharedObject createSharedObject(java.lang.String descriptionName)
                                 throws SharedObjectCreateException
Create ISharedObject instance. Given a SharedObjectTypeDescription name, this method will

Parameters:
descriptionName - the SharedObjectTypeDescription name to lookup
Returns:
a valid instance of ISharedObject
Throws:
SharedObjectCreateException

createSharedObject

ISharedObject createSharedObject(java.lang.String descriptionName,
                                 java.lang.Object[] args)
                                 throws SharedObjectCreateException
Create ISharedObject instance. Given a SharedObjectTypeDescription name, this method will

Parameters:
descriptionName - the SharedObjectTypeDescription name to lookup
args - the Object [] of arguments passed to the ISharedObjectInstantiator.createInstance method
Returns:
a valid instance of IContainer
Throws:
SharedObjectCreateException

createSharedObject

ISharedObject createSharedObject(java.lang.String descriptionName,
                                 java.lang.String[] argsTypes,
                                 java.lang.Object[] args)
                                 throws SharedObjectCreateException
Create ISharedObject instance. Given a SharedObjectTypeDescription name, this method will

Parameters:
descriptionName - the SharedObjectTypeDescription name to lookup
argsTypes - the String [] of argument types of the following args
args - the Object [] of arguments passed to the ISharedObjectInstantiator.createInstance method
Returns:
a valid instance of ISharedObject
Throws:
SharedObjectCreateException

removeDescription

SharedObjectTypeDescription removeDescription(SharedObjectTypeDescription scd)
Remove given description from set known to this factory.

Parameters:
scd - the SharedObjectTypeDescription to remove
Returns:
the removed SharedObjectTypeDescription, null if nothing removed