Package io.dropwizard.core.server
Class DefaultServerFactory
java.lang.Object
io.dropwizard.core.server.AbstractServerFactory
io.dropwizard.core.server.DefaultServerFactory
- All Implemented Interfaces:
ServerFactory
,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.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.int
int
boolean
void
setAdminConnectors
(List<ConnectorFactory> connectors) void
setAdminContextPath
(String adminContextPath) void
setAdminMaxThreads
(int adminMaxThreads) void
setAdminMinThreads
(int adminMinThreads) void
setApplicationConnectors
(List<ConnectorFactory> connectors) void
setApplicationContextPath
(String applicationContextPath) void
setEnableAdminVirtualThreads
(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, 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
-
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: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
-
toString
-