Package org.eclipse.ecf.core
Interface IContainerFactory
-
- All Known Implementing Classes:
ContainerFactory
public interface IContainerFactory
Container factory contractContainerFactory
for default implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContainerTypeDescription
addDescription(ContainerTypeDescription containerTypeDescription)
Add a ContainerTypeDescription to the set of known ContainerDescriptions.boolean
containsDescription(ContainerTypeDescription containerTypeDescription)
Check to see if a given named description is already contained by this factoryIContainer
createContainer()
Make a base IContainer instance.IContainer
createContainer(String containerTypeDescriptionName)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, Object[] parameters)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, String containerId)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, String containerId, Object[] parameters)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, String containerId, Map parameters)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, Map parameters)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, ID containerID)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, ID containerID, Object[] parameters)
Create a new container.IContainer
createContainer(String containerTypeDescriptionName, ID containerID, Map parameters)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, Object[] parameters)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, String containerId)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Object[] parameters)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Map parameters)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, Map parameters)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, ID containerID)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Object[] parameters)
Create a new container.IContainer
createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Map parameters)
Create a new container.IContainer
createContainer(ID containerID)
Create a new container.ContainerTypeDescription
getDescriptionByName(String containerTypeDescriptionName)
Get the known ContainerTypeDescription given it's name.List
getDescriptions()
Get a collection of the ContainerDescriptions currently known to this factory.ContainerTypeDescription[]
getDescriptionsForContainerAdapter(Class containerAdapter)
Get container type descriptions that support the given containerAdapterContainerTypeDescription
removeDescription(ContainerTypeDescription containerTypeDescription)
Remove given description from set known to this factory.
-
-
-
Method Detail
-
addDescription
ContainerTypeDescription addDescription(ContainerTypeDescription containerTypeDescription)
Add a ContainerTypeDescription to the set of known ContainerDescriptions.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to add to this factory. Must not benull
.- Returns:
- ContainerTypeDescription the old description of the same name, null if none found
-
getDescriptions
List getDescriptions()
Get a collection of the ContainerDescriptions currently known to this factory. This allows clients to query the factory to determine what if any other ContainerDescriptions are currently registered with the factory, and if so, what they are.- Returns:
- List of ContainerTypeDescription instances
-
containsDescription
boolean containsDescription(ContainerTypeDescription containerTypeDescription)
Check to see if a given named description is already contained by this factory- Parameters:
containerTypeDescription
- the ContainerTypeDescription to look for- Returns:
- true if description is already known to factory, false otherwise
-
getDescriptionByName
ContainerTypeDescription getDescriptionByName(String containerTypeDescriptionName)
Get the known ContainerTypeDescription given it's name.- Parameters:
containerTypeDescriptionName
- the name to use as key to find ContainerTypeDescription. Must not benull
.- Returns:
- ContainerTypeDescription found. Null if not found.
-
removeDescription
ContainerTypeDescription removeDescription(ContainerTypeDescription containerTypeDescription)
Remove given description from set known to this factory.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to remove- Returns:
- the removed ContainerTypeDescription, null if nothing removed
-
getDescriptionsForContainerAdapter
ContainerTypeDescription[] getDescriptionsForContainerAdapter(Class containerAdapter)
Get container type descriptions that support the given containerAdapter- Parameters:
containerAdapter
- the container adapter. Must not be null.- Returns:
- ContainerTypeDescription[] of descriptions that support the given container adapter. If no ContainerTypeDescriptions found that support the given adapter, an empty array will be returned.
-
createContainer
IContainer createContainer() throws ContainerCreateException
Make a base IContainer instance.- Returns:
- IContainer instance. A non-
null
instance will be returned. - Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(ID containerID) throws ContainerCreateException
Create a new container.- Parameters:
containerID
- the container's new ID. Must not benull
.- Returns:
- IContainer instance. A non-
null
. instance will be returned. - Throws:
ContainerCreateException
- if some problem creating a base IContainer instance.
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use. Must not benull
.- Returns:
- a valid instance of IContainer. Will not be
null
. - Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(String containerTypeDescriptionName) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to lookup. Must not benull
.- Returns:
- a valid instance of IContainer. Will not be
null
. - Throws:
ContainerCreateException
- if cannot create container of given name
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, Object[] parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use to create the instance. Must not benull
.parameters
- an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer. A non-
null
instance will be returned. - Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, Object[] parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to lookup. Must not benull
.parameters
- the Object [] of parameters passed to the IContainerInstantiator.createInstance method. May benull
.- Returns:
- a valid instance of IContainer. Will not be
null
. - Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, String containerId) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to use to create the instance. Must not benull
.containerId
- the container's new ID. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, String containerId, Object[] parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to use to create the instance. Must not benull
.containerId
- the container's new ID. May benull
.parameters
- an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use to create the instance. Must not benull
.containerId
- the container's new ID. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Object[] parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use to create the instance. Must not benull
.containerId
- the container's new ID. May benull
.parameters
- an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Object[] parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use to create the instance. Must not benull
.containerID
- the container's new ID. May benull
.parameters
- an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, ID containerID, Object[] parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to lookup. Must not benull
.containerID
- the new container's id. May benull
.parameters
- the Object [] of parameters passed to the IContainerInstantiator.createInstance method. May benull
.- Returns:
- a valid instance of IContainer. Will not be
null
. - Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to lookup. Must not benull
.containerID
- the new container's id. May benull
.- Returns:
- a valid instance of IContainer. Will not be
null
. - Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, ID containerID) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to lookup. Must not benull
.containerID
- the new container's id. May benull
.- Returns:
- a valid instance of IContainer. Will not be
null
. - Throws:
ContainerCreateException
- if some problem creating the instance.
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Map parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use to create the instance. Must not benull
.containerID
- the container's new ID. Must not benull
.parameters
- a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Map parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use to create the instance. Must not benull
.containerId
- the container's new ID. May benull
.parameters
- a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, ID containerID, Map parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to lookup. Must not benull
.containerID
- the container's new ID. May benull
.parameters
- a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, String containerId, Map parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to lookup. Must not benull
.containerId
- the container's new ID. May benull
.parameters
- a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(ContainerTypeDescription containerTypeDescription, Map parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescription
- the ContainerTypeDescription to use to create the instance. Must not benull
.parameters
- a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
createContainer
IContainer createContainer(String containerTypeDescriptionName, Map parameters) throws ContainerCreateException
Create a new container.- Parameters:
containerTypeDescriptionName
- the ContainerTypeDescription name to lookup. Must not benull
.parameters
- a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May benull
.- Returns:
- a valid instance of IContainer
- Throws:
ContainerCreateException
- if some problem creating the instance.- Since:
- 3.1
-
-