public class ProvisioningOrchestrator extends Object
Constructor and Description |
---|
ProvisioningOrchestrator(GetExistingDataSourcesCommand getExistingDataSourcesCommand,
CreateDataSourceCommand createDataSourceCommand,
PopulateDataSourceCommand populateDataSourceCommand,
RemoveDataSourceCommand removeDataSourceCommand,
DataSourceBasedMultiTenantConnectionProvider multiTenantConnectionProvider,
org.springframework.context.ApplicationEventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
void |
onDataSourceCreatedEvent(DataSourceCreatedEvent event)
Populates the datasource after it has been created
|
void |
onDataSourcePopulatedEvent(DataSourcePopulatedEvent event)
Registers the datasource within the multitenant connection provider after it has been populated
|
void |
onProvisioningRequestedEvent(ProvisioningRequestedEvent event)
Creates a datasource after provisioning has been requested for a new tenant
|
void |
onRemovalRequestedEvent(RemovalRequestedEvent event)
Removes the datasource after removal has been requested for a new tenant
|
void |
onStartUp(org.springframework.context.event.ContextRefreshedEvent event)
Fetches already provisioned datasources on application start
|
public ProvisioningOrchestrator(GetExistingDataSourcesCommand getExistingDataSourcesCommand, CreateDataSourceCommand createDataSourceCommand, PopulateDataSourceCommand populateDataSourceCommand, RemoveDataSourceCommand removeDataSourceCommand, DataSourceBasedMultiTenantConnectionProvider multiTenantConnectionProvider, org.springframework.context.ApplicationEventPublisher eventPublisher)
@EventListener public void onStartUp(@Nonnull org.springframework.context.event.ContextRefreshedEvent event)
event
- that triggers this listener@Async @EventListener public void onProvisioningRequestedEvent(@Nonnull ProvisioningRequestedEvent event)
event
- that triggers this listener@Async @EventListener public void onDataSourceCreatedEvent(@Nonnull DataSourceCreatedEvent event)
event
- that triggers this listener@Async @EventListener public void onDataSourcePopulatedEvent(@Nonnull DataSourcePopulatedEvent event)
event
- that triggers this listener@Async @EventListener public void onRemovalRequestedEvent(@Nonnull RemovalRequestedEvent event)
event
- that triggers this listenerCopyright © 2019 SAP SE. All rights reserved.