public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFactory
ReactiveWebServerFactory
that can be used to create NettyWebServer
s.Constructor and Description |
---|
NettyReactiveWebServerFactory() |
NettyReactiveWebServerFactory(int port) |
Modifier and Type | Method and Description |
---|---|
void |
addServerCustomizers(NettyServerCustomizer... serverCustomizers)
Add
NettyServerCustomizer s that should applied while building the server. |
Collection<NettyServerCustomizer> |
getServerCustomizers()
Returns a mutable collection of the
NettyServerCustomizer s that will be
applied to the Netty server builder. |
WebServer |
getWebServer(HttpHandler httpHandler)
Gets a new fully configured but paused
WebServer instance. |
void |
setLifecycleTimeout(Duration lifecycleTimeout)
Set the maximum amount of time that should be waited when starting or stopping the
server.
|
void |
setServerCustomizers(Collection<? extends NettyServerCustomizer> serverCustomizers)
Set
NettyServerCustomizer s that should be applied to the Netty server
builder. |
addErrorPages, createTempDir, getAddress, getCompression, getErrorPages, getHttp2, getPort, getServerHeader, getSsl, getSslStoreProvider, setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setSsl, setSslStoreProvider
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setSsl, setSslStoreProvider
addErrorPages
public NettyReactiveWebServerFactory()
public NettyReactiveWebServerFactory(int port)
public 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()
public Collection<NettyServerCustomizer> getServerCustomizers()
NettyServerCustomizer
s that will be
applied to the Netty server builder.public void setServerCustomizers(Collection<? extends NettyServerCustomizer> serverCustomizers)
NettyServerCustomizer
s that should be applied to the Netty server
builder. Calling this method will replace any existing customizers.serverCustomizers
- the customizers to setpublic void addServerCustomizers(NettyServerCustomizer... serverCustomizers)
NettyServerCustomizer
s that should applied while building the server.serverCustomizers
- the customizers to addpublic void setLifecycleTimeout(Duration lifecycleTimeout)
lifecycleTimeout
- the lifecycle timeoutCopyright © 2019 Pivotal Software, Inc.. All rights reserved.