public class AbstractCloudConfig.ServiceConnectionFactory extends Object
| Constructor and Description |
|---|
AbstractCloudConfig.ServiceConnectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
DataSource |
dataSource()
Get the
DataSource object associated with the only relational database service bound to the app. |
DataSource |
dataSource(DataSourceConfig dataSourceConfig)
Get the
DataSource object associated with the only relational database service bound to the app
configured as specified. |
DataSource |
dataSource(String serviceId)
Get the
DataSource object for the specified relational database service. |
DataSource |
dataSource(String serviceId,
DataSourceConfig dataSourceConfig)
Get the
DataSource object for the specified relational database service configured as specified. |
MongoDbFactory |
mongoDbFactory()
Get the
MongoDbFactory object associated with the only MongoDB service bound to the app. |
MongoDbFactory |
mongoDbFactory(MongoDbFactoryConfig mongoDbFactoryConfig)
Get the
MongoDbFactory object associated with the only MongoDB service bound to the app
configured as specified. |
MongoDbFactory |
mongoDbFactory(String serviceId)
Get the
MongoDbFactory object for the specified MongoDB service. |
MongoDbFactory |
mongoDbFactory(String serviceId,
MongoDbFactoryConfig mongoDbFactoryConfig)
Get the
MongoDbFactory object for the specified MongoDB service configured as specified. |
ConnectionFactory |
rabbitConnectionFactory()
Get the
ConnectionFactory object associated with the only RabbitMQ service bound to the app. |
ConnectionFactory |
rabbitConnectionFactory(RabbitConnectionFactoryConfig rabbitConnectionFactoryConfig)
Get the
ConnectionFactory object associated with the only RabbitMQ service bound to the app
configured as specified. |
ConnectionFactory |
rabbitConnectionFactory(String serviceId)
Get the
ConnectionFactory object for the specified RabbitMQ service. |
ConnectionFactory |
rabbitConnectionFactory(String serviceId,
RabbitConnectionFactoryConfig rabbitConnectionFactoryConfig)
Get the
ConnectionFactory object for the specified RabbitMQ service configured as specified. |
RedisConnectionFactory |
redisConnectionFactory()
Get the
RedisConnectionFactory object associated with the only Redis service bound to the app. |
RedisConnectionFactory |
redisConnectionFactory(PooledServiceConnectorConfig redisConnectionFactoryConfig)
Get the
RedisConnectionFactory object associated with the only Redis service bound to the app
configured as specified. |
RedisConnectionFactory |
redisConnectionFactory(String serviceId)
Get the
RedisConnectionFactory object for the specified Redis service. |
RedisConnectionFactory |
redisConnectionFactory(String serviceId,
PooledServiceConnectorConfig redisConnectionFactoryConfig)
Get the
RedisConnectionFactory object for the specified Redis service configured as specified. |
Object |
service()
Get the service connector object associated with the only service bound to the app.
|
<T> T |
service(Class<T> serviceConnectorType)
Get the service connector object of the specified type if there is only one such candidate service
This is equivalent to the
|
Object |
service(String serviceId)
Get the service connector object for the specified service.
|
<T> T |
service(String serviceId,
Class<T> serviceConnectorType)
Get the service connector object of the specified type and service id
This is equivalent to the
|
public AbstractCloudConfig.ServiceConnectionFactory()
public DataSource dataSource()
DataSource object associated with the only relational database service bound to the app.
This is equivalent to the CloudException - if there are either 0 or more than 1 relational database services.public DataSource dataSource(DataSourceConfig dataSourceConfig)
DataSource object associated with the only relational database service bound to the app
configured as specified.
This is equivalent to the dataSourceConfig - configuration for the data source createdCloudException - if there are either 0 or more than 1 relational database services.public DataSource dataSource(String serviceId)
DataSource object for the specified relational database service.
This is equivalent to the serviceId - the name of the serviceCloudException - if the specified service doesn't existpublic DataSource dataSource(String serviceId, DataSourceConfig dataSourceConfig)
DataSource object for the specified relational database service configured as specified.
This is equivalent to the serviceId - the name of the servicedataSourceConfig - configuration for the data source createdCloudException - if the specified service doesn't existpublic MongoDbFactory mongoDbFactory()
MongoDbFactory object associated with the only MongoDB service bound to the app.
This is equivalent to the CloudException - if there are either 0 or more than 1 mongodb services.public MongoDbFactory mongoDbFactory(MongoDbFactoryConfig mongoDbFactoryConfig)
MongoDbFactory object associated with the only MongoDB service bound to the app
configured as specified.
This is equivalent to the mongoDbFactoryConfig - configuration for the mondo db factory createdCloudException - if there are either 0 or more than 1 mongodb services.public MongoDbFactory mongoDbFactory(String serviceId)
MongoDbFactory object for the specified MongoDB service.
This is equivalent to the serviceId - the name of the serviceCloudException - if the specified service doesn't existpublic MongoDbFactory mongoDbFactory(String serviceId, MongoDbFactoryConfig mongoDbFactoryConfig)
MongoDbFactory object for the specified MongoDB service configured as specified.
This is equivalent to the serviceId - the name of the servicemongoDbFactoryConfig - configuration for the mongo db factory createdCloudException - if the specified service doesn't existpublic ConnectionFactory rabbitConnectionFactory()
ConnectionFactory object associated with the only RabbitMQ service bound to the app.
This is equivalent to the CloudException - if there are either 0 or more than 1 RabbitMQ services.public ConnectionFactory rabbitConnectionFactory(RabbitConnectionFactoryConfig rabbitConnectionFactoryConfig)
ConnectionFactory object associated with the only RabbitMQ service bound to the app
configured as specified.
This is equivalent to the rabbitConnectionFactoryConfig - configuration for the rabbit connection factory createdCloudException - if there are either 0 or more than 1 RabbitMQ services.public ConnectionFactory rabbitConnectionFactory(String serviceId)
ConnectionFactory object for the specified RabbitMQ service.
This is equivalent to the serviceId - the name of the serviceCloudException - if the specified service doesn't existpublic ConnectionFactory rabbitConnectionFactory(String serviceId, RabbitConnectionFactoryConfig rabbitConnectionFactoryConfig)
ConnectionFactory object for the specified RabbitMQ service configured as specified.
This is equivalent to the serviceId - the name of the servicerabbitConnectionFactoryConfig - configuration for the ConnectionFactory createdCloudException - if the specified service doesn't existpublic RedisConnectionFactory redisConnectionFactory()
RedisConnectionFactory object associated with the only Redis service bound to the app.
This is equivalent to the CloudException - if there are either 0 or more than 1 redis services.public RedisConnectionFactory redisConnectionFactory(PooledServiceConnectorConfig redisConnectionFactoryConfig)
RedisConnectionFactory object associated with the only Redis service bound to the app
configured as specified.
This is equivalent to the redisConnectionFactoryConfig - configuration for the RedisConnectionFactory createdCloudException - if there are either 0 or more than 1 redis services.public RedisConnectionFactory redisConnectionFactory(String serviceId)
RedisConnectionFactory object for the specified Redis service.
This is equivalent to the serviceId - the name of the serviceCloudException - if the specified service doesn't existpublic RedisConnectionFactory redisConnectionFactory(String serviceId, PooledServiceConnectorConfig redisConnectionFactoryConfig)
RedisConnectionFactory object for the specified Redis service configured as specified.
This is equivalent to the serviceId - the name of the serviceredisConnectionFactoryConfig - configuration for the RedisConnectionFactory createdCloudException - if the specified service doesn't existpublic Object service()
CloudException - if there are either 0 or more than 1 services.public <T> T service(Class<T> serviceConnectorType)
CloudException - if there are either 0 or more than 1 candidate services.public Object service(String serviceId)
CloudException - if the specified service doesn't existpublic <T> T service(String serviceId, Class<T> serviceConnectorType)
CloudException - if the specified service doesn't exist