001package io.ebean.service; 002 003import io.ebean.Database; 004import io.ebean.config.DatabaseConfig; 005 006/** 007 * Creates the Database implementations. This is used internally by the EbeanServerFactory and is not currently 008 * exposed as public API. 009 */ 010public interface SpiContainer { 011 012 /** 013 * Create the EbeanServer for a given configuration. 014 * 015 * @param configuration The configuration information for this database. 016 */ 017 Database createServer(DatabaseConfig configuration); 018 019 /** 020 * Create an EbeanServer just using the name. 021 * <p> 022 * In this case the dataSource parameters etc will be defined on the global 023 * avaje.properties file. 024 * </p> 025 */ 026 Database createServer(String name); 027 028 /** 029 * Shutdown any Ebean wide resources such as clustering. 030 */ 031 void shutdown(); 032}