org.apache.tuscany.sca.core
Class DefaultExtensionPointRegistry

java.lang.Object
  extended by org.apache.tuscany.sca.core.DefaultExtensionPointRegistry
All Implemented Interfaces:
ExtensionPointRegistry

public class DefaultExtensionPointRegistry
extends java.lang.Object
implements ExtensionPointRegistry

Default implementation of a registry to hold all the Tuscany core extension points. As the point of contact for all extension artifacts this registry allows loaded extensions to find all other parts of the system and register themselves appropriately.

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

Constructor Summary
DefaultExtensionPointRegistry()
           
 
Method Summary
 void addExtensionPoint(java.lang.Object extensionPoint)
          Add an extension point to the registry.
<T> T
getExtensionPoint(java.lang.Class<T> extensionPointType)
          Get the extension point by the interface that it implements
 void removeExtensionPoint(java.lang.Object extensionPoint)
          Remove an extension point based on the interface that it implements
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExtensionPointRegistry

public DefaultExtensionPointRegistry()
Method Detail

addExtensionPoint

public void addExtensionPoint(java.lang.Object extensionPoint)
Add an extension point to the registry. This default implementation stores extensions against the interfaces that they implement.

Specified by:
addExtensionPoint in interface ExtensionPointRegistry
Parameters:
extensionPoint - The instance of the extension point

getExtensionPoint

public <T> T getExtensionPoint(java.lang.Class<T> extensionPointType)
Get the extension point by the interface that it implements

Specified by:
getExtensionPoint in interface ExtensionPointRegistry
Parameters:
extensionPointType - The lookup key (extension point interface)
Returns:
The instance of the extension point

removeExtensionPoint

public void removeExtensionPoint(java.lang.Object extensionPoint)
Remove an extension point based on the interface that it implements

Specified by:
removeExtensionPoint in interface ExtensionPointRegistry
Parameters:
extensionPoint - The extension point to remove