public class DefaultMetadataContext extends Object implements org.mule.runtime.api.metadata.MetadataContext
MetadataContext, it provides access to the extension configuration and connection
in the metadata fetch invocation.| Constructor and Description |
|---|
DefaultMetadataContext(Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> configInstance,
ConnectionManager connectionManager,
org.mule.runtime.api.metadata.MetadataCache cache,
org.mule.metadata.api.ClassTypeLoader typeLoader)
Retrieves the configuration for the related component
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
org.mule.runtime.api.metadata.MetadataCache |
getCache() |
<C> Optional<C> |
getConfig() |
<C> Optional<C> |
getConnection()
Retrieves the connection for the related component and configuration
|
org.mule.metadata.api.builder.BaseTypeBuilder |
getTypeBuilder() |
org.mule.metadata.api.ClassTypeLoader |
getTypeLoader() |
public DefaultMetadataContext(Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> configInstance, ConnectionManager connectionManager, org.mule.runtime.api.metadata.MetadataCache cache, org.mule.metadata.api.ClassTypeLoader typeLoader) throws org.mule.runtime.api.connection.ConnectionException
configInstance - optional configuration of a componentconnectionManager - ConnectionManager which is able to find a connection for the component using the
cache - instance of the MetadataCache for this contexttypeLoader - instance of a ClassTypeLoader in the context of this extensionorg.mule.runtime.api.connection.ConnectionExceptionpublic <C> Optional<C> getConfig()
getConfig in interface org.mule.runtime.api.metadata.MetadataContextC - Configuration typepublic <C> Optional<C> getConnection() throws org.mule.runtime.api.connection.ConnectionException
getConnection in interface org.mule.runtime.api.metadata.MetadataContextC - Connection typeOptional.empty() will be returnedorg.mule.runtime.api.connection.ConnectionException - when no valid connection is found for the related component and configurationpublic org.mule.runtime.api.metadata.MetadataCache getCache()
getCache in interface org.mule.runtime.api.metadata.MetadataContextpublic org.mule.metadata.api.ClassTypeLoader getTypeLoader()
getTypeLoader in interface org.mule.runtime.api.metadata.MetadataContextpublic org.mule.metadata.api.builder.BaseTypeBuilder getTypeBuilder()
getTypeBuilder in interface org.mule.runtime.api.metadata.MetadataContextpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.DisposableCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.