public abstract class ExtensionManager extends Object
ExtensionManager
is a service used to register and unregister ExtensionFactory
s with a given
type of an extensible object.Extensible
,
ExtensibleObject
Constructor and Description |
---|
ExtensionManager() |
Modifier and Type | Method and Description |
---|---|
<E> E |
getExtension(Object extensibleObject,
Class<E> extensionType)
Gets a dynamic extension for the given (extensible) object.
|
abstract ExtensionFactory[] |
getExtensionFactories(Class<?> extensibleType)
Gets all extension factories registered for the given type.
|
static ExtensionManager |
getInstance() |
abstract void |
register(Class<?> extensibleType,
ExtensionFactory factory)
Registers an extension factory for the given extensible type.
|
static void |
setInstance(ExtensionManager instance) |
abstract void |
unregister(Class<?> extensibleType,
ExtensionFactory factory)
Unregisters an extension factory for the given extensible type.
|
public static ExtensionManager getInstance()
public static void setInstance(ExtensionManager instance)
instance
- The service instance.public abstract void register(Class<?> extensibleType, ExtensionFactory factory)
extensibleType
- The extensible type.factory
- The factory.public abstract void unregister(Class<?> extensibleType, ExtensionFactory factory)
extensibleType
- The extensible type.factory
- The factory.public abstract ExtensionFactory[] getExtensionFactories(Class<?> extensibleType)
extensibleType
- The extensible type.public <E> E getExtension(Object extensibleObject, Class<E> extensionType)
extensibleObject
- The (extensible) object.extensionType
- The type of the requested extension.null
if the given object is not extensible by this factory
or if the factory fails to provide that extension.ExtensionFactory.getExtension(Object, Class)
Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.