public interface NodePluginFactory
NodePlugin.| Modifier and Type | Method and Description |
|---|---|
Class<? extends NodePlugin> |
getDefaultClassNodePlugin()
Returns the default
NodePlugin interface supported as a Class. |
String |
getDefaultPluginId(Class<? extends NodePlugin> classNodePlugin)
Returns the default plugin ID associated with a
NodePlugin class. |
<NodePluginInterface extends NodePlugin> |
getPlugin(Class<NodePluginInterface> classNodePlugin,
Node node)
Returns a
NodePlugin of the specified Class for a given Node. |
<NodePluginInterface extends NodePlugin> |
isPluginSupported(Class<NodePluginInterface> classNodePlugin)
Indicates if a
NodePlugin is supported. |
Class<? extends NodePlugin> getDefaultClassNodePlugin()
NodePlugin interface supported as a Class.
Most NodePluginFactory support a single NodePlugin interface and allowing the
NodePluginFactory to specify that default NodePlugin interface allows
Config to avoid having to redundantly specify both the class of the
NodePlugin and of the NodePluginFactory.
null can be returned to indicate that no default NodePlugin Class is supported, generally implying that multiple NodePlugin Class's are supported and none is considered more important than the other. In this case Config must explicitly specify the NodePlugin class.
String getDefaultPluginId(Class<? extends NodePlugin> classNodePlugin)
NodePlugin class.
null can be returned to indicate that no default plugin ID is recommended. In
that case Config must explicitely specify the plugin ID.
The plugin ID within Config allows having multiple NodePlugin of the same
interface on the same Node. Generally it is up to Config to specify the
plugin ID of the various NodePlugin's. But some NodePlugin's may by convention
generally be identified using a given plugin ID which can be returned by this
method. This avoid having to specify the plugin ID in Config.
classNodePlugin - Class of the NodePlugin interface.<NodePluginInterface extends NodePlugin> boolean isPluginSupported(Class<NodePluginInterface> classNodePlugin)
NodePlugin is supported.
This method is useful mostly for configuration tools that interact with the user and that may want to validate user input.
NodePluginInterface - NodePlugin interface.classNodePlugin - Class of the NodePlugin.<NodePluginInterface extends NodePlugin> NodePluginInterface getPlugin(Class<NodePluginInterface> classNodePlugin, Node node)
NodePlugin of the specified Class for a given Node.
Generally a new NodePlugin instance is returned as Node caches instantiated NodePlugin's.
NodePluginInterface - NodePlugin interface.classNodePlugin - Class of the NodePlugin.node - Node.Copyright © 2015–2017 AZYVA INC.. All rights reserved.