public class WebSocketHandlerMapping extends SimpleUrlHandlerMapping implements SmartLifecycle
SmartLifecycle
コンテナーでもあり、Lifecycle
を実装するすべてのハンドラーへの開始呼び出しと停止呼び出しを伝搬する SimpleUrlHandlerMapping
の拡張。ハンドラーは通常、WebSocketHttpRequestHandler
または SockJsHttpRequestHandler
であると想定されています。logger
DEFAULT_PHASE
BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターと説明 |
---|
WebSocketHandlerMapping() |
修飾子と型 | メソッドと説明 |
---|---|
protected void | initServletContext(ServletContextEE servletContext) サブクラスは、このアプリケーションオブジェクトが実行される ServletContext に基づいて、カスタム初期化のためにこれをオーバーライドできます。 |
boolean | isRunning() このコンポーネントが現在実行されているかどうかを確認します。 |
void | start() このコンポーネントを起動します。 |
void | stop() このメソッドを返すとコンポーネントが完全に停止するように、通常は同期的にこのコンポーネントを停止します。 |
getUrlMap, initApplicationContext, registerHandlers, setMappings, setUrlMap
buildPathExposingHandler, exposePathWithinMapping, exposeUriTemplateVariables, getHandlerInternal, getHandlerMap, getRootHandler, lookupHandler, match, registerHandler, registerHandler, setLazyInitHandlers, setRootHandler, setUseTrailingSlashMatch, supportsTypeLevelMappings, useTrailingSlashMatch, validateHandler
adaptInterceptor, detectMappedInterceptors, extendInterceptors, formatMappingName, getAdaptedInterceptors, getCorsConfiguration, getCorsConfigurations, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initInterceptors, setAlwaysUseFullPath, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
getPhase, isAutoStartup, stop
getHandler
protected void initServletContext(ServletContextEE servletContext)
WebApplicationObjectSupport
デフォルトの実装は空です。WebApplicationObjectSupport.initApplicationContext(org.springframework.context.ApplicationContext)
および WebApplicationObjectSupport.setServletContext(javax.servlet.ServletContext)
によって呼び出されます。
WebApplicationObjectSupport
の initServletContext
servletContext
- このアプリケーションオブジェクトが実行される ServletContext (非 null
)public void start()
Lifecycle
コンポーネントがすでに実行されている場合は、例外をスローしないでください。
コンテナーの場合、これは適用されるすべてのコンポーネントに開始シグナルを伝播します。
Lifecycle
の start
SmartLifecycle.isAutoStartup()
public void stop()
Lifecycle
SmartLifecycle
とその stop(Runnable)
バリアントの実装を検討してください。 この停止通知は破棄前に送信されるとは限らないことに注意してください。通常のシャットダウンでは、一般的な破棄コールバックが伝播される前に、Lifecycle
Bean は最初に停止通知を受信します。ただし、コンテキストの存続期間中のホットリフレッシュまたは中断されたリフレッシュ試行では、特定の Bean の destroy メソッドが、停止シグナルを事前に考慮することなく呼び出されます。
コンポーネントが実行されていない(まだ開始されていない)場合は、例外をスローしないでください。
コンテナーの場合、これは停止シグナルを適用するすべてのコンポーネントに伝播します。
Lifecycle
の stop
SmartLifecycle.stop(Runnable)
, DisposableBean.destroy()