Package spark.embeddedserver
Class EmbeddedServers
java.lang.Object
spark.embeddedserver.EmbeddedServers
Holds and uses the factories for creating different Embedded servers.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
add
(Object identifier, EmbeddedServerFactory factory) Adds an Embedded server factory for the provided identifier.static EmbeddedServer
create
(Object identifier, Routes routeMatcher, ExceptionMapper exceptionMapper, StaticFilesConfiguration staticFilesConfiguration, boolean multipleHandlers) Creates an embedded server of type corresponding to the provided identifier.static EmbeddedServer
create
(Object identifier, Routes routeMatcher, StaticFilesConfiguration staticFilesConfiguration, boolean multipleHandlers) Deprecated.static EmbeddedServers.Identifiers
static void
-
Field Details
-
factories
-
-
Constructor Details
-
EmbeddedServers
public EmbeddedServers()
-
-
Method Details
-
initialize
public static void initialize() -
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 identifierrouteMatcher
- the route matcherstaticFilesConfiguration
- the static files configuration objectmultipleHandlers
- true if other handlers exist- Returns:
- the created EmbeddedServer object
-
add
Adds an Embedded server factory for the provided identifier.- Parameters:
identifier
- the identifierfactory
- the factory
-