Package io.dropwizard.core.server
Class SimpleServerFactory
java.lang.Object
io.dropwizard.core.server.AbstractServerFactory
io.dropwizard.core.server.SimpleServerFactory
- All Implemented Interfaces:
ServerFactory,io.dropwizard.jackson.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.Serverbuild(Environment environment) Build a server for the given Dropwizard application.voidconfigure(Environment environment) Configures the given environment with settings defined in the factory.io.dropwizard.jetty.ConnectorFactoryvoidsetAdminContextPath(String contextPath) voidsetApplicationContextPath(String contextPath) voidsetConnector(io.dropwizard.jetty.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, getMaxThreads, getMetricPrefix, getMinThreads, getNofileHardLimit, getNofileSoftLimit, getRegisterDefaultExceptionMappers, getRequestLogFactory, getResponseMeteredLevel, getShutdownGracePeriod, getStartsAsRoot, getUid, getUmask, getUser, isEnableVirtualThreads, isThreadPoolSizedCorrectly, printBanner, setAllowedMethods, setDetailedJsonProcessingExceptionMapper, setDumpAfterStart, setDumpBeforeStop, setEnableThreadNameFilter, setEnableVirtualThreads, setGid, setGroup, setGzipFilterFactory, setIdleThreadTimeout, setJerseyRootPath, setMaxThreads, setMinThreads, setNofileHardLimit, setNofileSoftLimit, setRegisterDefaultExceptionMappers, setRequestLogFactory, setShutdownGracePeriod, setStartsAsRoot, setUid, setUmask, setUser
-
Constructor Details
-
SimpleServerFactory
public SimpleServerFactory()
-
-
Method Details
-
getConnector
public io.dropwizard.jetty.ConnectorFactory getConnector() -
setConnector
public void setConnector(io.dropwizard.jetty.ConnectorFactory factory) -
getApplicationContextPath
-
setApplicationContextPath
-
getAdminContextPath
-
setAdminContextPath
-
build
Description copied from interface:ServerFactoryBuild a server for the given Dropwizard application.- Parameters:
environment- the application's environment- Returns:
- a
Serverrunning the Dropwizard application
-
configure
Description copied from interface:ServerFactoryConfigures the given environment with settings defined in the factory.- Parameters:
environment- the application's environment
-