public class ExtensionManager
extends java.lang.Object
Extension
s.Constructor and Description |
---|
ExtensionManager(DockController controller)
Creates a new manager.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Extension extension)
Adds
extension to the list of extensions. |
Extension[] |
getExtensions()
Gets a list of all extensions that are currently known to this manager.
|
void |
init()
Starts up all extensions.
|
void |
kill()
Stops and removes all extensions.
|
<E> java.util.List<E> |
load(ExtensionName<E> name)
Loads all extensions matching
name . |
void |
remove(Extension extension)
Removes
extension from the list of extensions. |
<E> SharedExtension<E> |
share(ExtensionName<E> name)
Creates a new
SharedExtension object which uses name as key to read
extensions. |
protected void |
tryLoadDefaultExtensions()
Tries to load the standard extensions that are developed alongside with the
main-framework.
|
public ExtensionManager(DockController controller)
controller
- the controller in whose realm this manager worksprotected void tryLoadDefaultExtensions()
public void add(Extension extension)
extension
to the list of extensions.extension
- the new extensionpublic void remove(Extension extension)
extension
from the list of extensions.extension
- the extension to removepublic Extension[] getExtensions()
public <E> java.util.List<E> load(ExtensionName<E> name)
name
.E
- the type of extensions that is loadedname
- the name of the extensionsnull
extensions, may be emptypublic <E> SharedExtension<E> share(ExtensionName<E> name)
SharedExtension
object which uses name
as key to read
extensions. The SharedExtension
object can be bound
and unbound
at any time, it can be reused.name
- the name of the extension to sharepublic void init()
public void kill()