クラス ServletWebServerInitializedEvent
java.lang.ObjectSE
java.util.EventObjectSE
org.springframework.context.ApplicationEvent
org.springframework.boot.web.server.context.WebServerInitializedEvent
org.springframework.boot.web.server.servlet.context.ServletWebServerInitializedEvent
- 実装されているすべてのインターフェース:
SerializableSE
WebServer の準備ができた後に公開されるイベント。実行中のサーバーのローカルポートを取得できます。通常は開始されますが、リスナーは自由にサーバーをインスペクションし、必要に応じて停止および開始できます。
- 導入:
- 4.0.0
- 作成者:
- Dave Syer
- 関連事項:
フィールドのサマリー
クラス EventObjectSE から継承されたフィールド
sourceSEコンストラクターの概要
コンストラクターコンストラクター説明ServletWebServerInitializedEvent(WebServer webServer, ServletWebServerApplicationContext applicationContext) メソッドのサマリー
修飾子と型メソッド説明サーバーが作成されたアプリケーションコンテキストにアクセスします。クラス WebServerInitializedEvent から継承されたメソッド
getSource, getWebServerクラス ApplicationEvent から継承されたメソッド
getTimestampクラス EventObjectSE から継承されたメソッド
toString
コンストラクターの詳細
ServletWebServerInitializedEvent
public ServletWebServerInitializedEvent(WebServer webServer, ServletWebServerApplicationContext applicationContext)
メソッドの詳細
getApplicationContext
サーバーが作成されたアプリケーションコンテキストにアクセスします。サーバー自体に作用する前に、これが期待と一致している(現在のコンテキストと等しいなど)ことを確認するのが実用的な場合があります。- 次で指定:
- クラス
WebServerInitializedEventのgetApplicationContext - 戻り値:
- サーバーが作成された applicationContext