类 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 newAbstractConfigurableWebServerFactoryinstance.AbstractConfigurableWebServerFactory(int port) Create a newAbstractConfigurableWebServerFactoryinstance with the specified port. -
方法概要
修饰符和类型方法说明voidaddErrorPages(ErrorPage... errorPages) Adds error pages that will be used when handling exceptions.protected final FilecreateTempDir(String prefix) Return the absolute temp dir for given web server.Return the address that the web server binds to.Returns a mutable set ofErrorPagesthat will be used when handling exceptions.getHttp2()intgetPort()The port that the web server listens on.Returns the shutdown configuration that will be applied to the server.getSsl()protected final SslBundleReturn theSslBundlethat should be used with this server.Return the configuredSslBundles.voidsetAddress(InetAddress address) Sets the specific network address that the server should bind to.voidsetCompression(Compression compression) Sets the compression configuration that will be applied to the server's default connector.voidsetErrorPages(Set<? extends ErrorPage> errorPages) Sets the error pages that will be used when handling exceptions.voidSets the HTTP/2 configuration that will be applied to the server.voidsetPort(int port) Sets the port that the web server should listen on.voidsetServerHeader(String serverHeader) Sets the server header value.voidsetShutdown(Shutdown shutdown) Sets the shutdown configuration that will be applied to the server.voidSets the SSL configuration that will be applied to the server's default connector.voidsetSslBundles(SslBundles sslBundles) Sets the SSL bundles that can be used to configure SSL connections.
-
构造器详细资料
-
AbstractConfigurableWebServerFactory
public AbstractConfigurableWebServerFactory()Create a newAbstractConfigurableWebServerFactoryinstance. -
AbstractConfigurableWebServerFactory
public AbstractConfigurableWebServerFactory(int port) Create a newAbstractConfigurableWebServerFactoryinstance 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) 从接口复制的说明:ConfigurableWebServerFactorySets 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
从接口复制的说明:ConfigurableWebServerFactorySets the specific network address that the server should bind to.- 指定者:
setAddress在接口中ConfigurableWebServerFactory- 参数:
address- the address to set (defaults tonull)
-
getErrorPages
Returns a mutable set ofErrorPagesthat will be used when handling exceptions.- 返回:
- the error pages
-
setErrorPages
从接口复制的说明:ConfigurableWebServerFactorySets the error pages that will be used when handling exceptions.- 指定者:
setErrorPages在接口中ConfigurableWebServerFactory- 参数:
errorPages- the error pages
-
addErrorPages
从接口复制的说明:ErrorPageRegistryAdds error pages that will be used when handling exceptions.- 指定者:
addErrorPages在接口中ErrorPageRegistry- 参数:
errorPages- the error pages
-
getSsl
-
setSsl
从接口复制的说明:ConfigurableWebServerFactorySets the SSL configuration that will be applied to the server's default connector.- 指定者:
setSsl在接口中ConfigurableWebServerFactory- 参数:
ssl- the SSL configuration
-
getSslBundles
Return the configuredSslBundles.- 返回:
- the
SslBundlesornull - 从以下版本开始:
- 3.2.0
-
setSslBundles
从接口复制的说明:ConfigurableWebServerFactorySets the SSL bundles that can be used to configure SSL connections.- 指定者:
setSslBundles在接口中ConfigurableWebServerFactory- 参数:
sslBundles- the SSL bundles
-
getHttp2
-
setHttp2
从接口复制的说明:ConfigurableWebServerFactorySets the HTTP/2 configuration that will be applied to the server.- 指定者:
setHttp2在接口中ConfigurableWebServerFactory- 参数:
http2- the HTTP/2 configuration
-
getCompression
-
setCompression
从接口复制的说明:ConfigurableWebServerFactorySets the compression configuration that will be applied to the server's default connector.- 指定者:
setCompression在接口中ConfigurableWebServerFactory- 参数:
compression- the compression configuration
-
getServerHeader
-
setServerHeader
从接口复制的说明:ConfigurableWebServerFactorySets the server header value.- 指定者:
setServerHeader在接口中ConfigurableWebServerFactory- 参数:
serverHeader- the server header value
-
setShutdown
从接口复制的说明:ConfigurableWebServerFactorySets 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 theSslBundlethat 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.
-