public class SharedObjectFactory extends java.lang.Object implements ISharedObjectFactory
ISharedObject
instances. This class provides ECF
clients an entry point to constructing ISharedObject
instances. Modifier and Type | Field and Description |
---|---|
protected static ISharedObjectFactory |
instance |
Modifier | Constructor and Description |
---|---|
protected |
SharedObjectFactory() |
Modifier and Type | Method and Description |
---|---|
SharedObjectTypeDescription |
addDescription(SharedObjectTypeDescription description) |
protected SharedObjectTypeDescription |
addDescription0(SharedObjectTypeDescription n) |
boolean |
containsDescription(SharedObjectTypeDescription scd)
Check to see if a given named description is already contained by this
factory
|
protected boolean |
containsDescription0(SharedObjectTypeDescription scd) |
ISharedObject |
createSharedObject(SharedObjectTypeDescription desc,
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.
|
static ISharedObjectFactory |
getDefault() |
protected SharedObjectTypeDescription |
getDescription0(SharedObjectTypeDescription scd) |
protected SharedObjectTypeDescription |
getDescription0(java.lang.String name) |
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.
|
protected java.util.List |
getDescriptions0() |
SharedObjectTypeDescription |
removeDescription(SharedObjectTypeDescription scd)
Remove given description from set known to this factory.
|
protected SharedObjectTypeDescription |
removeDescription0(SharedObjectTypeDescription n) |
protected static ISharedObjectFactory instance
public static ISharedObjectFactory getDefault()
public SharedObjectTypeDescription addDescription(SharedObjectTypeDescription description)
addDescription
in interface ISharedObjectFactory
public java.util.List getDescriptions()
ISharedObjectFactory
getDescriptions
in interface ISharedObjectFactory
protected java.util.List getDescriptions0()
protected SharedObjectTypeDescription addDescription0(SharedObjectTypeDescription n)
public boolean containsDescription(SharedObjectTypeDescription scd)
ISharedObjectFactory
containsDescription
in interface ISharedObjectFactory
scd
- the SharedObjectTypeDescription to look forprotected boolean containsDescription0(SharedObjectTypeDescription scd)
protected SharedObjectTypeDescription getDescription0(SharedObjectTypeDescription scd)
protected SharedObjectTypeDescription getDescription0(java.lang.String name)
public SharedObjectTypeDescription getDescriptionByName(java.lang.String name) throws SharedObjectCreateException
ISharedObjectFactory
getDescriptionByName
in interface ISharedObjectFactory
SharedObjectCreateException
public ISharedObject createSharedObject(SharedObjectTypeDescription desc, java.lang.Object[] args) throws SharedObjectCreateException
ISharedObjectFactory
createSharedObject
in interface ISharedObjectFactory
desc
- the SharedObjectTypeDescription to use to create the instanceargs
- an Object [] of arguments passed to the createInstance method
of the ISharedObjectInstantiatorSharedObjectCreateException
- if shared object cannot be createdpublic ISharedObject createSharedObject(java.lang.String descriptionName) throws SharedObjectCreateException
ISharedObjectFactory
createSharedObject
in interface ISharedObjectFactory
descriptionName
- the SharedObjectTypeDescription name to lookupSharedObjectCreateException
public ISharedObject createSharedObject(java.lang.String descriptionName, java.lang.Object[] args) throws SharedObjectCreateException
ISharedObjectFactory
createSharedObject
in interface ISharedObjectFactory
descriptionName
- the SharedObjectTypeDescription name to lookupargs
- the Object [] of arguments passed to the
ISharedObjectInstantiator.createInstance methodSharedObjectCreateException
public SharedObjectTypeDescription removeDescription(SharedObjectTypeDescription scd)
ISharedObjectFactory
removeDescription
in interface ISharedObjectFactory
scd
- the SharedObjectTypeDescription to removeprotected SharedObjectTypeDescription removeDescription0(SharedObjectTypeDescription n)