public interface Extension extends Described, Capable
Extensions can augment a system by providing new features in the form of operations. What makes an extension different from a class implementing a certain interface is the fact that extensions provide enough information at runtime so that they can be used without prior knowledge, and can be both executed or integrated into tooling seamlessly.
An extension is not a miscellaneous group of methods, but can be seen (and may be derived from) an object model. As such, an extension will provide several ways to configure itself (akin to providing different constructors), and will provide a set of operations that may be eventually executed.
The extension model doesn't just map a JVM object model. Extensions provide richer metadata, and a dynamic execution model, but more importantly they restrict the way operations are defined and used to a manageable subset that would deterministic data flow analysis.
An extension doesn't define any predefined syntax, evaluation order or execution paradigm. The operations provided
are expected to be used as individual building blocks in a bigger system, hence the name Extension
| Modifier and Type | Method and Description |
|---|---|
Configuration |
getConfiguration(String name)
Returns the
Configuration
that matches the given name. |
List<Configuration> |
getConfigurations()
Returns the
Configurations
available for this extension. |
String |
getName()
A simple name for this extension.
|
Operation |
getOperation(String name)
Returns the
Operation that matches
the given name. |
List<Operation> |
getOperations()
Returns the
Operations
available for this extension. |
String |
getVersion()
Returns this extension's version.
|
getDescriptiongetCapabilities, isCapableOfString getName()
String getVersion()
The extension version is specified as a Semantic Versioning.
Note that while an extension implements a specific version, nothing prevents several versions of the same extension to coexists at runtime.
List<Configuration> getConfigurations()
Configurations
available for this extension. Each configuration is guaranteed to have a unique name.
There is always at least one configuration. The first configuration is the preferred (default) one, the rest of the configurations are ordered alphabetically.
List with the available Configurations.Configuration getConfiguration(String name) throws NoSuchConfigurationException
Configuration
that matches the given name.name - case sensitive configuration nameConfigurationNoSuchConfigurationException - if no configuration available for that nameList<Operation> getOperations()
Operations
available for this extension. Each operation is guaranteed to have a unique name, and that name
cannot be already in use by one of the available getConfigurations()
There is always at least one operation, and operations will be sorted alphabetically.
Operation getOperation(String name) throws NoSuchOperationException
Operation that matches
the given name.name - case sensitive operation nameOperationNoSuchOperationException - if no operation matches the given nameCopyright © 2015 MuleSoft, Inc.. All rights reserved.