类 AbstractConfigurableWebServerFactory
java.lang.Object
org.springframework.boot.web.server.AbstractConfigurableWebServerFactory
public abstract class AbstractConfigurableWebServerFactory
extends Object
implements ConfigurableWebServerFactory
Abstract base class for
ConfigurableWebServerFactory
implementations.- 从以下版本开始:
- 2.0.0
- 作者:
- Phillip Webb, Dave Syer, Andy Wilkinson, Stephane Nicoll, Ivan Sopov, Eddú Meléndez, Brian Clozel, Scott Frederick
-
构造器概要
构造器构造器说明Create a newAbstractConfigurableWebServerFactory
instance.AbstractConfigurableWebServerFactory
(int port) Create a newAbstractConfigurableWebServerFactory
instance with the specified port. -
方法概要
修饰符和类型方法说明void
addErrorPages
(ErrorPage... errorPages) Adds error pages that will be used when handling exceptions.protected final File
createTempDir
(String prefix) Return the absolute temp dir for given web server.Return the address that the web server binds to.Returns a mutable set ofErrorPages
that will be used when handling exceptions.getHttp2()
int
getPort()
The port that the web server listens on.Returns the shutdown configuration that will be applied to the server.getSsl()
protected final SslBundle
Return theSslBundle
that should be used with this server.Return the configuredSslBundles
.void
setAddress
(InetAddress address) Sets the specific network address that the server should bind to.void
setCompression
(Compression compression) Sets the compression configuration that will be applied to the server's default connector.void
setErrorPages
(Set<? extends ErrorPage> errorPages) Sets the error pages that will be used when handling exceptions.void
Sets the HTTP/2 configuration that will be applied to the server.void
setPort
(int port) Sets the port that the web server should listen on.void
setServerHeader
(String serverHeader) Sets the server header value.void
setShutdown
(Shutdown shutdown) Sets the shutdown configuration that will be applied to the server.void
Sets the SSL configuration that will be applied to the server's default connector.void
setSslBundles
(SslBundles sslBundles) Sets the SSL bundles that can be used to configure SSL connections.
-
构造器详细资料
-
AbstractConfigurableWebServerFactory
public AbstractConfigurableWebServerFactory()Create a newAbstractConfigurableWebServerFactory
instance. -
AbstractConfigurableWebServerFactory
public AbstractConfigurableWebServerFactory(int port) Create a newAbstractConfigurableWebServerFactory
instance with the specified port.- 参数:
port
- the port number for the web server
-
-
方法详细资料
-
getPort
public int getPort()The port that the web server listens on.- 返回:
- the port
-
setPort
public void setPort(int port) 从接口复制的说明:ConfigurableWebServerFactory
Sets the port that the web server should listen on. If not specified port '8080' will be used. Use port -1 to disable auto-start (i.e. start the web application context but not have it listen to any port).- 指定者:
setPort
在接口中ConfigurableWebServerFactory
- 参数:
port
- the port to set
-
getAddress
Return the address that the web server binds to.- 返回:
- the address
-
setAddress
从接口复制的说明:ConfigurableWebServerFactory
Sets the specific network address that the server should bind to.- 指定者:
setAddress
在接口中ConfigurableWebServerFactory
- 参数:
address
- the address to set (defaults tonull
)
-
getErrorPages
Returns a mutable set ofErrorPages
that will be used when handling exceptions.- 返回:
- the error pages
-
setErrorPages
从接口复制的说明:ConfigurableWebServerFactory
Sets the error pages that will be used when handling exceptions.- 指定者:
setErrorPages
在接口中ConfigurableWebServerFactory
- 参数:
errorPages
- the error pages
-
addErrorPages
从接口复制的说明:ErrorPageRegistry
Adds error pages that will be used when handling exceptions.- 指定者:
addErrorPages
在接口中ErrorPageRegistry
- 参数:
errorPages
- the error pages
-
getSsl
-
setSsl
从接口复制的说明:ConfigurableWebServerFactory
Sets the SSL configuration that will be applied to the server's default connector.- 指定者:
setSsl
在接口中ConfigurableWebServerFactory
- 参数:
ssl
- the SSL configuration
-
getSslBundles
Return the configuredSslBundles
.- 返回:
- the
SslBundles
ornull
- 从以下版本开始:
- 3.2.0
-
setSslBundles
从接口复制的说明:ConfigurableWebServerFactory
Sets the SSL bundles that can be used to configure SSL connections.- 指定者:
setSslBundles
在接口中ConfigurableWebServerFactory
- 参数:
sslBundles
- the SSL bundles
-
getHttp2
-
setHttp2
从接口复制的说明:ConfigurableWebServerFactory
Sets the HTTP/2 configuration that will be applied to the server.- 指定者:
setHttp2
在接口中ConfigurableWebServerFactory
- 参数:
http2
- the HTTP/2 configuration
-
getCompression
-
setCompression
从接口复制的说明:ConfigurableWebServerFactory
Sets the compression configuration that will be applied to the server's default connector.- 指定者:
setCompression
在接口中ConfigurableWebServerFactory
- 参数:
compression
- the compression configuration
-
getServerHeader
-
setServerHeader
从接口复制的说明:ConfigurableWebServerFactory
Sets the server header value.- 指定者:
setServerHeader
在接口中ConfigurableWebServerFactory
- 参数:
serverHeader
- the server header value
-
setShutdown
从接口复制的说明:ConfigurableWebServerFactory
Sets the shutdown configuration that will be applied to the server.- 指定者:
setShutdown
在接口中ConfigurableWebServerFactory
- 参数:
shutdown
- the shutdown configuration
-
getShutdown
Returns the shutdown configuration that will be applied to the server.- 返回:
- the shutdown configuration
- 从以下版本开始:
- 2.3.0
-
getSslBundle
Return theSslBundle
that should be used with this server.- 返回:
- the SSL bundle
-
getServerNameSslBundles
-
createTempDir
Return the absolute temp dir for given web server.- 参数:
prefix
- server name- 返回:
- the temp dir for given server.
-