public abstract class Extender extends Object
ExtensionBundle life cycle operations that start and stop bundles
of extension points implementations at runtime. start(ExtensionBundle) ,
stop(ExtensionBundle) and stopAll() ).Extender#getExtension(Extensible, ExtensionPoint)).register(ExtensionPoint, ExtensionFactory) and
unregister(ExtensionPoint)getExtension(Extensible, ExtensionPoint)| Constructor and Description |
|---|
Extender() |
| Modifier and Type | Method and Description |
|---|---|
abstract <E,M extends Trait> |
getExtension(Extensible anExtensible,
ExtensionPoint<E,M> point)
Creates and returns a unique per
ExtensibleTrait object or
null if no extension-point factory is registered for the
given ExtensionPoint.Given that Extensible.getTrait(Class) is used to obtain the
ExtendedTrait that the returned extension is uniquely associated
with, the uniqueness and garbage collection of the returned extension is
dependent on how the given Extensible handles its
ExtendedTraits. |
static Extender |
getInstance() |
abstract void |
register(ExtensionPoint<?,?> point,
ExtensionFactory<?> factory)
Registers an extension-point to factory association to be used in
extension creation.
|
abstract void |
start(ExtensionBundle bundle)
Start life-cycle phase trigger method.
Upon successful execution the bundle will have all its extension points registered using register(ExtensionPoint, ExtensionFactory) and
ready to be. |
abstract void |
stop(ExtensionBundle bundle)
Start life-cycle phase trigger method.
Upon successful execution the bundle will have all its extension points unregistered using unregister(ExtensionPoint). |
abstract void |
stopAll()
Stops all previously registered
ExtensionBundles. |
abstract void |
unregister(ExtensionPoint<?,?> point)
Unregisters an extension-point to factory association of the given
extension point.
|
public static Extender getInstance()
ExtenderImpl instancepublic abstract void start(ExtensionBundle bundle)
register(ExtensionPoint, ExtensionFactory) and
ready to be.bundle - to be startedpublic abstract void stop(ExtensionBundle bundle)
unregister(ExtensionPoint).bundle - to be stoppedpublic abstract void stopAll()
ExtensionBundles.public abstract <E,M extends Trait> E getExtension(Extensible anExtensible, ExtensionPoint<E,M> point)
ExtensibleTrait object or
null if no extension-point factory is registered for the
given ExtensionPoint.Extensible.getTrait(Class) is used to obtain the
ExtendedTrait that the returned extension is uniquely associated
with, the uniqueness and garbage collection of the returned extension is
dependent on how the given Extensible handles its
ExtendedTraits.anExtensible - point - ExtensibleTrait extension object or
null if no extension-point factory is registered for
the given ExtensionPointpublic abstract void register(ExtensionPoint<?,?> point, ExtensionFactory<?> factory)
ExtensibleTrait extension is returned by
getExtension(Extensible, ExtensionPoint).point - the extension point to be associated with the given
extension factory during extension retrieval using
getExtension(Extensible, ExtensionPoint)factory - public abstract void unregister(ExtensionPoint<?,?> point)
getExtension(Extensible, ExtensionPoint).point - Copyright © 2005–2018 Alfresco Software. All rights reserved.