Package io.dropwizard.core.server
Class SimpleServerFactory
java.lang.Object
io.dropwizard.core.server.AbstractServerFactory
io.dropwizard.core.server.SimpleServerFactory
- All Implemented Interfaces:
ServerFactory
,Discoverable
A single-connector implementation of
For more configuration parameters, see
ServerFactory
, suitable for PaaS deployments
(e.g., Heroku) where applications are limited to a single, runtime-defined port. A startup script
can override the port via -Ddw.server.connector.port=$PORT
.
Configuration Parameters:
Name | Default | Description |
connector |
An HTTP connector listening on port 8080 . |
The connector which will handle both application and admin requests. |
applicationContextPath |
/application |
The context path of the application servlets, including Jersey. |
adminContextPath |
/admin |
The context path of the admin servlets, including metrics and tasks. |
AbstractServerFactory
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.server.Server
build
(Environment environment) Build a server for the given Dropwizard application.void
configure
(Environment environment) Configures the given environment with settings defined in the factory.void
setAdminContextPath
(String contextPath) void
setApplicationContextPath
(String contextPath) void
setConnector
(ConnectorFactory factory) Methods inherited from class io.dropwizard.core.server.AbstractServerFactory
addGracefulHandler, addRequestLog, buildGzipHandler, buildServer, buildSetUIDListener, createAdminServlet, createAppServlet, createThreadPool, getAllowedMethods, getDetailedJsonProcessingExceptionMapper, getDumpAfterStart, getDumpBeforeStop, getEnableThreadNameFilter, getGid, getGroup, getGzipFilterFactory, getIdleThreadTimeout, getJerseyRootPath, getMaxQueuedRequests, getMaxThreads, getMetricPrefix, getMinThreads, getNofileHardLimit, getNofileSoftLimit, getRegisterDefaultExceptionMappers, getRequestLogFactory, getResponseMeteredLevel, getShutdownGracePeriod, getStartsAsRoot, getUid, getUmask, getUser, getVirtualThreadsExecutorService, isEnableVirtualThreads, isThreadPoolSizedCorrectly, printBanner, setAllowedMethods, setDetailedJsonProcessingExceptionMapper, setDumpAfterStart, setDumpBeforeStop, setEnableThreadNameFilter, setEnableVirtualThreads, setGid, setGroup, setGzipFilterFactory, setIdleThreadTimeout, setJerseyRootPath, setMaxQueuedRequests, setMaxThreads, setMinThreads, setNofileHardLimit, setNofileSoftLimit, setRegisterDefaultExceptionMappers, setRequestLogFactory, setShutdownGracePeriod, setStartsAsRoot, setUid, setUmask, setUser
-
Constructor Details
-
SimpleServerFactory
public SimpleServerFactory()
-
-
Method Details
-
getConnector
-
setConnector
-
getApplicationContextPath
-
setApplicationContextPath
-
getAdminContextPath
-
setAdminContextPath
-
build
Description copied from interface:ServerFactory
Build a server for the given Dropwizard application.- Parameters:
environment
- the application's environment- Returns:
- a
Server
running the Dropwizard application
-
configure
Description copied from interface:ServerFactory
Configures the given environment with settings defined in the factory.- Parameters:
environment
- the application's environment
-