public class DynamicDbConfigResolver extends AbstractAnnotatedObject implements DbConfigResolver
DbConfig from a dynamic DataSourceConfig.
Resolved DbConfig are cached and reused every time a
configured is resolved to the same static DataSourceConfig
| Modifier and Type | Field and Description |
|---|---|
static String |
NO_METADATA_OBTAINED |
static String |
TEST_CONNECTION_ERROR |
PROPERTY_NAME| Constructor and Description |
|---|
DynamicDbConfigResolver(String name,
DbConfigFactory dbConfigFactory,
DataSourceFactory dataSourceFactory,
DataSourceConfig dataSourceConfig) |
| Modifier and Type | Method and Description |
|---|---|
org.mule.common.Result<org.mule.common.metadata.MetaData> |
getMetaData(org.mule.common.metadata.MetaDataKey metaDataKey) |
org.mule.common.Result<List<org.mule.common.metadata.MetaDataKey>> |
getMetaDataKeys() |
DbConfig |
resolve(MuleEvent muleEvent)
Resolves which database configuration to use for a given event
|
org.mule.common.TestResult |
test() |
getAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAnnotation, getAnnotations, setAnnotationspublic static final String TEST_CONNECTION_ERROR
public static final String NO_METADATA_OBTAINED
public DynamicDbConfigResolver(String name, DbConfigFactory dbConfigFactory, DataSourceFactory dataSourceFactory, DataSourceConfig dataSourceConfig)
public DbConfig resolve(MuleEvent muleEvent) throws UnresolvableDbConfigException
DbConfigResolverresolve in interface DbConfigResolvermuleEvent - event used to resolve the configuration. Not null.UnresolvableDbConfigException - when is not possible to resolve a database configurationpublic org.mule.common.TestResult test()
test in interface org.mule.common.Testablepublic org.mule.common.Result<List<org.mule.common.metadata.MetaDataKey>> getMetaDataKeys()
getMetaDataKeys in interface org.mule.common.metadata.ConnectorMetaDataEnabledpublic org.mule.common.Result<org.mule.common.metadata.MetaData> getMetaData(org.mule.common.metadata.MetaDataKey metaDataKey)
getMetaData in interface org.mule.common.metadata.ConnectorMetaDataEnabledCopyright © 2003–2018 MuleSoft, Inc.. All rights reserved.