Package io.dropwizard.core.server
Class DefaultServerFactory
java.lang.Object
io.dropwizard.core.server.AbstractServerFactory
io.dropwizard.core.server.DefaultServerFactory
- All Implemented Interfaces:
ServerFactory,io.dropwizard.jackson.Discoverable
The default implementation of
For more configuration parameters, see
ServerFactory, which allows for multiple sets of
application and admin connectors, all running on separate ports. Admin connectors use a separate
thread pool to keep the control and data planes separate(ish).
Configuration Parameters:
| Name | Default | Description |
applicationConnectors |
An HTTP connector listening on port 8080. |
A set of connectors which will handle application requests. |
adminConnectors |
An HTTP connector listening on port 8081. |
A set of connectors which will handle admin requests. |
adminMaxThreads |
64 | The maximum number of threads to use for admin requests. |
adminMinThreads |
1 | The minimum number of threads to use for admin requests. |
enableAdminVirtualThreads |
false | Whether to use virtual threads for the admin connectors |
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.List<io.dropwizard.jetty.ConnectorFactory>intintList<io.dropwizard.jetty.ConnectorFactory>booleanvoidsetAdminConnectors(List<io.dropwizard.jetty.ConnectorFactory> connectors) voidsetAdminContextPath(String adminContextPath) voidsetAdminMaxThreads(int adminMaxThreads) voidsetAdminMinThreads(int adminMinThreads) voidsetApplicationConnectors(List<io.dropwizard.jetty.ConnectorFactory> connectors) voidsetApplicationContextPath(String applicationContextPath) voidsetEnableAdminVirtualThreads(boolean enableAdminVirtualThreads) toString()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
-
DefaultServerFactory
public DefaultServerFactory()
-
-
Method Details
-
getApplicationConnectors
-
setApplicationConnectors
-
getAdminConnectors
-
setAdminConnectors
-
getAdminMaxThreads
public int getAdminMaxThreads() -
setAdminMaxThreads
public void setAdminMaxThreads(int adminMaxThreads) -
getAdminMinThreads
public int getAdminMinThreads() -
setAdminMinThreads
public void setAdminMinThreads(int adminMinThreads) -
isEnableAdminVirtualThreads
public boolean isEnableAdminVirtualThreads() -
setEnableAdminVirtualThreads
public void setEnableAdminVirtualThreads(boolean enableAdminVirtualThreads) -
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
-
toString
-