public abstract class AbstractDataSourceServiceImporterMixin<PooledDataSourceType extends DataSource> extends Object implements ServiceImporter<DataSource>, DataSourceServiceImporterActivation
DataSourceServiceImporterActivation.Activator
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOGGER |
protected Module |
module |
Constructor and Description |
---|
AbstractDataSourceServiceImporterMixin() |
Modifier and Type | Method and Description |
---|---|
DataSource |
importService(ImportedServiceDescriptor importedServiceDescriptor)
Imports an instance of the service type described in the service descriptor.
|
boolean |
isAvailable(DataSource instance)
Ask if the service is available or not.
|
protected abstract void |
passivateDataSourcePool(PooledDataSourceType dataSourcePool) |
void |
passivateDataSourceService() |
protected abstract PooledDataSourceType |
setupDataSourcePool(DataSourceConfigurationValue configuration) |
protected static final org.slf4j.Logger LOGGER
@Structure protected Module module
public AbstractDataSourceServiceImporterMixin()
public final void passivateDataSourceService() throws Exception
passivateDataSourceService
in interface DataSourceServiceImporterActivation
Exception
public final DataSource importService(ImportedServiceDescriptor importedServiceDescriptor) throws ServiceImporterException
ServiceImporter
importService
in interface ServiceImporter<DataSource>
importedServiceDescriptor
- The service descriptor.ServiceImporterException
- if import failed.public final boolean isAvailable(DataSource instance)
ServiceImporter
isAvailable
in interface ServiceImporter<DataSource>
instance
- the instance to be checkedprotected abstract PooledDataSourceType setupDataSourcePool(DataSourceConfigurationValue configuration) throws Exception
Exception
protected abstract void passivateDataSourcePool(PooledDataSourceType dataSourcePool) throws Exception
Exception