001package com.avaje.ebean.common; 002 003import com.avaje.ebean.EbeanServer; 004import com.avaje.ebean.config.ServerConfig; 005 006/** 007 * Creates the EbeanServer 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 016 * The configuration information for this server. 017 */ 018 EbeanServer createServer(ServerConfig configuration); 019 020 /** 021 * Create an EbeanServer just using the name. 022 * <p> 023 * In this case the dataSource parameters etc will be defined on the global 024 * avaje.properties file. 025 * </p> 026 */ 027 EbeanServer createServer(String name); 028 029 /** 030 * Shutdown any Ebean wide resources such as clustering. 031 */ 032 void shutdown(); 033}