public abstract class ExtensionComponent extends AbstractAnnotatedObject implements MuleContextAware, org.mule.runtime.api.metadata.MetadataKeyProvider, org.mule.runtime.api.metadata.MetadataProvider, FlowConstructAware, org.mule.runtime.api.lifecycle.Lifecycle
OperationMessageProcessor and
ExtensionMessageSource.
Provides capabilities of Metadata resolution and configuration validation.
| Modifier and Type | Field and Description |
|---|---|
protected ConnectionManagerAdapter |
connectionManager |
protected ExtensionManagerAdapter |
extensionManager |
protected FlowConstruct |
flowConstruct |
protected MuleContext |
muleContext |
| Modifier | Constructor and Description |
|---|---|
protected |
ExtensionComponent(org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
org.mule.runtime.api.meta.model.ComponentModel componentModel,
org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider,
ExtensionManagerAdapter extensionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Delegates into
doDispose() making sure that it executes using the extension's class loader |
protected abstract void |
doDispose()
Implementors will use this method to perform their own disposing logic
|
protected abstract void |
doInitialise()
Implementors will use this method to perform their own initialisation logic
|
protected abstract void |
doStart()
Implementors will use this method to perform their own starting logic
|
protected abstract void |
doStop()
Implementors will use this method to perform their own stopping logic
|
protected Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> |
getConfiguration(Event event) |
protected org.mule.runtime.extension.api.runtime.ConfigurationProvider |
getConfigurationProvider() |
protected ClassLoader |
getExtensionClassLoader() |
org.mule.runtime.api.meta.model.ExtensionModel |
getExtensionModel() |
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor> |
getMetadata() |
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor> |
getMetadata(org.mule.runtime.api.metadata.MetadataKey key) |
protected org.mule.runtime.api.metadata.MetadataContext |
getMetadataContext() |
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> |
getMetadataKeys() |
protected abstract ParameterValueResolver |
getParameterValueResolver() |
void |
initialise()
Makes sure that the operation is valid by invoking
validateOperationConfiguration(ConfigurationProvider) and then
delegates on doInitialise() for custom initialisation |
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setMuleContext(MuleContext context) |
void |
start()
Delegates into
doStart() making sure that it executes using the extension's class loader |
void |
stop()
Delegates into
doStop() making sure that it executes using the extension's class loader |
protected abstract void |
validateOperationConfiguration(org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider)
Validates that the configuration returned by the
configurationProvider is compatible with the associated
ComponentModel |
getAnnotation, getAnnotations, setAnnotationsprotected final ExtensionManagerAdapter extensionManager
protected FlowConstruct flowConstruct
protected MuleContext muleContext
@Inject protected ConnectionManagerAdapter connectionManager
protected ExtensionComponent(org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
org.mule.runtime.api.meta.model.ComponentModel componentModel,
org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider,
ExtensionManagerAdapter extensionManager)
public final void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
validateOperationConfiguration(ConfigurationProvider) and then
delegates on doInitialise() for custom initialisationinitialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationException - if a fatal error occurs causing the Mule instance to shutdownpublic final void start()
throws org.mule.runtime.api.exception.MuleException
doStart() making sure that it executes using the extension's class loaderstart in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleException - if the phase couldn't be appliedpublic final void stop()
throws org.mule.runtime.api.exception.MuleException
doStop() making sure that it executes using the extension's class loaderstop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleException - if the phase couldn't be appliedpublic final void dispose()
doDispose() making sure that it executes using the extension's class loaderdispose in interface org.mule.runtime.api.lifecycle.Disposableprotected abstract void doInitialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationException - if a fatal error occurs causing the Mule instance to shutdownprotected abstract void doStart()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleException - if the component could not startprotected abstract void doStop()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleException - if the component could not stopprotected abstract void doDispose()
protected abstract void validateOperationConfiguration(org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider)
configurationProvider is compatible with the associated
ComponentModelconfigurationProvider - public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> getMetadataKeys()
throws org.mule.runtime.api.metadata.MetadataResolvingException
getMetadataKeys in interface org.mule.runtime.api.metadata.MetadataKeyProviderorg.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor> getMetadata()
throws org.mule.runtime.api.metadata.MetadataResolvingException
getMetadata in interface org.mule.runtime.api.metadata.MetadataProviderorg.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor> getMetadata(org.mule.runtime.api.metadata.MetadataKey key)
throws org.mule.runtime.api.metadata.MetadataResolvingException
getMetadata in interface org.mule.runtime.api.metadata.MetadataProviderorg.mule.runtime.api.metadata.MetadataResolvingExceptionpublic void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct in interface FlowConstructAwareprotected org.mule.runtime.api.metadata.MetadataContext getMetadataContext()
throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionprotected Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> getConfiguration(Event event)
protected ClassLoader getExtensionClassLoader()
protected org.mule.runtime.extension.api.runtime.ConfigurationProvider getConfigurationProvider()
protected abstract ParameterValueResolver getParameterValueResolver()
public org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.