001package io.ebean.service;
002
003import io.ebean.EbeanServer;
004import io.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 The configuration information for this server.
016   */
017  EbeanServer createServer(ServerConfig 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  EbeanServer createServer(String name);
027
028  /**
029   * Shutdown any Ebean wide resources such as clustering.
030   */
031  void shutdown();
032}