クラス SimpDestinationMessageMatcher
java.lang.ObjectSE
org.springframework.security.messaging.util.matcher.SimpDestinationMessageMatcher
- 実装されたすべてのインターフェース:
MessageMatcher<ObjectSE>
public final class SimpDestinationMessageMatcher
extends ObjectSE
implements MessageMatcher<ObjectSE>
MessageMatcher は、事前定義されたパターンを Message
の宛先と比較します。指定された SimpMessageType
でのオプションのマッチングもサポートされています。
- 導入:
- 4.0
フィールドサマリー
フィールドインターフェース org.springframework.security.messaging.util.matcher.MessageMatcher から継承されたフィールド
ANY_MESSAGE
コンストラクターのサマリー
コンストラクターコンストラクター説明SimpDestinationMessageMatcher
(StringSE pattern) 指定されたパターン、nullSimpMessageType
(すべての型に一致)、およびデフォルトのコンストラクターから作成されたAntPathMatcher
を使用して、新しいインスタンスを作成します。SimpDestinationMessageMatcher
(StringSE pattern, org.springframework.util.PathMatcher pathMatcher) 指定されたパターンとPathMatcher
で新しいインスタンスを作成します。メソッドのサマリー
修飾子と型メソッド説明createMessageMatcher
(StringSE pattern, org.springframework.util.PathMatcher matcher) 指定されたパターンSimpMessageType.MESSAGE
とPathMatcher
で新しいインスタンスを作成します。createSubscribeMatcher
(StringSE pattern, org.springframework.util.PathMatcher matcher) 指定されたパターンSimpMessageType.SUBSCRIBE
とPathMatcher
で新しいインスタンスを作成します。extractPathVariables
(org.springframework.messaging.Message<?> message) boolean
matches
(org.springframework.messaging.Message<?> message) Message
が一致する場合は true、それ以外の場合は false を返しますtoString()
フィールドの詳細
NULL_DESTINATION_MATCHER
コンストラクターの詳細
SimpDestinationMessageMatcher
指定されたパターン、null
SimpMessageType
(すべての型に一致)、およびデフォルトのコンストラクターから作成されたAntPathMatcher
を使用して、新しいインスタンスを作成します。次のルールを使用しているにもかかわらず、マッピングは宛先と一致します。
- ? 1 文字に一致
- * 0 個以上の文字に一致します
- ** パスの 0 個以上の「ディレクトリ」に一致します
いくつかの例:
com/t?st.jsp
-com/test
に一致しますが、com/tast
またはcom/txst
にも一致しますcom/*suffix
-com
ディレクトリのsuffix
で終わるすべてのファイルに一致しますcom/**/test
-com
パスにあるtest
で終わるすべての宛先に一致します
- パラメーター:
pattern
- 使用するパターン
SimpDestinationMessageMatcher
public SimpDestinationMessageMatcher(StringSE pattern, org.springframework.util.PathMatcher pathMatcher) 指定されたパターンと
PathMatcher
で新しいインスタンスを作成します。- パラメーター:
pattern
- 使用するパターンpathMatcher
- 使用するPathMatcher
。
メソッドの詳細
matches
public boolean matches(org.springframework.messaging.Message<?> message) インターフェースからコピーされた説明:MessageMatcher
Message
が一致する場合は true、それ以外の場合は false を返します- 次で指定:
- インターフェース
MessageMatcher<ObjectSE>
のmatches
- パラメーター:
message
- 一致するMessage
- 戻り値:
Message
が一致する場合は true、そうでない場合は false
extractPathVariables
getMessageTypeMatcher
toString
createSubscribeMatcher
public static SimpDestinationMessageMatcher createSubscribeMatcher(StringSE pattern, org.springframework.util.PathMatcher matcher) 指定されたパターン
SimpMessageType.SUBSCRIBE
とPathMatcher
で新しいインスタンスを作成します。- パラメーター:
pattern
- 使用するパターンmatcher
- 使用するPathMatcher
。
createMessageMatcher
public static SimpDestinationMessageMatcher createMessageMatcher(StringSE pattern, org.springframework.util.PathMatcher matcher) 指定されたパターン
SimpMessageType.MESSAGE
とPathMatcher
で新しいインスタンスを作成します。- パラメーター:
pattern
- 使用するパターンmatcher
- 使用するPathMatcher
。