org.apache.tuscany.sca.core
Interface ModelFactoryExtensionPoint

All Known Implementing Classes:
DefaultModelFactoryExtensionPoint

public interface ModelFactoryExtensionPoint

An extension point for model factories. Model factories are provided to abstract the classes that represent artifacts in the assembly model away from their creation mechanism. When the runtime needs to extend the model as it reads in contributed artifacts it looks up the factory for the artifact required in this registry

Version:
$Rev: 539359 $ $Date: 2007-05-18 11:06:21 +0100 (Fri, 18 May 2007) $

Method Summary
 void addFactory(java.lang.Object factory)
          Add a model factory extension.
<T> T
getFactory(java.lang.Class<T> factoryInterface)
          Get a factory implementing the given interface.
 void removeFactory(java.lang.Object factory)
          Remove a model factory extension.
 

Method Detail

addFactory

void addFactory(java.lang.Object factory)
Add a model factory extension.

Parameters:
factory - The factory to add

removeFactory

void removeFactory(java.lang.Object factory)
Remove a model factory extension.

Parameters:
factory - The factory to remove

getFactory

<T> T getFactory(java.lang.Class<T> factoryInterface)
Get a factory implementing the given interface.

Parameters:
factoryInterface - the lookup key (factory interface)
Returns:
The factory