public class JettyReactiveWebServerFactory extends AbstractReactiveWebServerFactory
ReactiveWebServerFactory
that can be used to create JettyWebServer
s.Constructor and Description |
---|
JettyReactiveWebServerFactory()
Create a new
JettyServletWebServerFactory instance. |
JettyReactiveWebServerFactory(int port)
Create a new
JettyServletWebServerFactory that listens for requests using
the specified port. |
Modifier and Type | Method and Description |
---|---|
protected Server |
createJettyServer(JettyHttpHandlerAdapter servlet) |
ThreadPool |
getThreadPool()
Returns a Jetty
ThreadPool that should be used by the Server . |
WebServer |
getWebServer(HttpHandler httpHandler)
Gets a new fully configured but paused
WebServer instance. |
void |
setAcceptors(int acceptors)
Set the number of acceptor threads to use.
|
void |
setSelectors(int selectors)
Set the number of selector threads to use.
|
void |
setThreadPool(ThreadPool threadPool)
Set a Jetty
ThreadPool that should be used by the Server . |
addErrorPages, createTempDir, getAddress, getCompression, getErrorPages, getPort, getServerHeader, getSsl, getSslStoreProvider, setAddress, setCompression, setErrorPages, setPort, setServerHeader, setSsl, setSslStoreProvider
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setAddress, setCompression, setErrorPages, setPort, setServerHeader, setSsl, setSslStoreProvider
addErrorPages
public JettyReactiveWebServerFactory()
JettyServletWebServerFactory
instance.public JettyReactiveWebServerFactory(int port)
JettyServletWebServerFactory
that listens for requests using
the specified port.port
- the port to listen onpublic WebServer getWebServer(HttpHandler httpHandler)
ReactiveWebServerFactory
WebServer
instance. Clients should
not be able to connect to the returned server until WebServer.start()
is
called (which happens when the ApplicationContext
has been fully
refreshed).httpHandler
- the HTTP handler in charge of processing requestsWebServer
WebServer.stop()
protected Server createJettyServer(JettyHttpHandlerAdapter servlet)
public ThreadPool getThreadPool()
ThreadPool
that should be used by the Server
.ThreadPool
or null
public void setThreadPool(ThreadPool threadPool)
ThreadPool
that should be used by the Server
. If set to
null
(default), the Server
creates a ThreadPool
implicitly.threadPool
- a Jetty ThreadPool to be usedpublic void setAcceptors(int acceptors)
acceptors
- the number of acceptor threads to usepublic void setSelectors(int selectors)
selectors
- the number of selector threads to useCopyright © 2017 Pivotal Software, Inc.. All rights reserved.