类 ServletWebServerInitializedEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.boot.web.context.WebServerInitializedEvent
org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent
- 所有已实现的接口:
Serializable
Event to be published after the
WebServer
is ready. Useful for obtaining the
local port of a running server.
Normally it will have been started, but listeners are free to inspect the server and stop and start it if they want to.
- 从以下版本开始:
- 2.0.0
- 作者:
- Dave Syer
- 另请参阅:
-
字段概要
从类继承的字段 java.util.EventObject
source
-
构造器概要
构造器构造器说明ServletWebServerInitializedEvent
(WebServer webServer, ServletWebServerApplicationContext applicationContext) -
方法概要
修饰符和类型方法说明Access the application context that the server was created in.从类继承的方法 org.springframework.boot.web.context.WebServerInitializedEvent
getSource, getWebServer
从类继承的方法 org.springframework.context.ApplicationEvent
getTimestamp
从类继承的方法 java.util.EventObject
toString
-
构造器详细资料
-
ServletWebServerInitializedEvent
public ServletWebServerInitializedEvent(WebServer webServer, ServletWebServerApplicationContext applicationContext)
-
-
方法详细资料
-
getApplicationContext
Access the application context that the server was created in. Sometimes it is prudent to check that this matches expectations (like being equal to the current context) before acting on the server itself.- 指定者:
getApplicationContext
在类中WebServerInitializedEvent
- 返回:
- the applicationContext that the server was created from
-