Class EmbeddedServers

java.lang.Object
spark.embeddedserver.EmbeddedServers

public class EmbeddedServers extends Object
Holds and uses the factories for creating different Embedded servers.
  • Field Details

  • Constructor Details

    • EmbeddedServers

      public EmbeddedServers()
  • Method Details

    • initialize

      public static void initialize()
    • defaultIdentifier

      public static EmbeddedServers.Identifiers defaultIdentifier()
    • create

      @Deprecated public static EmbeddedServer create(Object identifier, Routes routeMatcher, StaticFilesConfiguration staticFilesConfiguration, boolean multipleHandlers)
      Deprecated.
    • create

      public static EmbeddedServer create(Object identifier, Routes routeMatcher, ExceptionMapper exceptionMapper, StaticFilesConfiguration staticFilesConfiguration, boolean multipleHandlers)
      Creates an embedded server of type corresponding to the provided identifier.
      Parameters:
      identifier - the identifier
      routeMatcher - the route matcher
      staticFilesConfiguration - the static files configuration object
      multipleHandlers - true if other handlers exist
      Returns:
      the created EmbeddedServer object
    • add

      public static void add(Object identifier, EmbeddedServerFactory factory)
      Adds an Embedded server factory for the provided identifier.
      Parameters:
      identifier - the identifier
      factory - the factory