クラス SimpDestinationMessageMatcher
- java.lang.Object
-
- org.springframework.security.messaging.util.matcher.SimpDestinationMessageMatcher
- 実装されているすべてのインターフェース:
MessageMatcher<java.lang.Object>
public final class SimpDestinationMessageMatcher extends java.lang.Object implements MessageMatcher<java.lang.Object>
MessageMatcher は、事前定義されたパターンを
Messageの宛先と比較します。指定されたSimpMessageTypeでのオプションのマッチングもサポートされています。- 導入:
- 4.0
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 static MessageMatcher<java.lang.Object>NULL_DESTINATION_MATCHERインターフェース org.springframework.security.messaging.util.matcher.MessageMatcher から継承されたフィールド
ANY_MESSAGE
コンストラクターの概要
コンストラクター コンストラクター 説明 SimpDestinationMessageMatcher(java.lang.String pattern)指定されたパターン、nullSimpMessageType(すべての型に一致)、およびデフォルトのコンストラクターから作成されたAntPathMatcherを使用して、新しいインスタンスを作成します。SimpDestinationMessageMatcher(java.lang.String pattern, org.springframework.util.PathMatcher pathMatcher)指定されたパターンとPathMatcherで新しいインスタンスを作成します。
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 static SimpDestinationMessageMatchercreateMessageMatcher(java.lang.String pattern, org.springframework.util.PathMatcher matcher)指定されたパターンSimpMessageType.MESSAGEとPathMatcherで新しいインスタンスを作成します。static SimpDestinationMessageMatchercreateSubscribeMatcher(java.lang.String pattern, org.springframework.util.PathMatcher matcher)指定されたパターンSimpMessageType.SUBSCRIBEとPathMatcherで新しいインスタンスを作成します。java.util.Map<java.lang.String,java.lang.String>extractPathVariables(org.springframework.messaging.Message<?> message)MessageMatcher<java.lang.Object>getMessageTypeMatcher()booleanmatches(org.springframework.messaging.Message<?> message)Messageが一致する場合は true、それ以外の場合は false を返しますjava.lang.StringtoString()
フィールドの詳細
NULL_DESTINATION_MATCHER
public static final MessageMatcher<java.lang.Object> NULL_DESTINATION_MATCHER
コンストラクターの詳細
SimpDestinationMessageMatcher
public SimpDestinationMessageMatcher(java.lang.String pattern)
指定されたパターン、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(java.lang.String pattern, org.springframework.util.PathMatcher pathMatcher)指定されたパターンと
PathMatcherで新しいインスタンスを作成します。- パラメーター:
pattern- 使用するパターンpathMatcher- 使用するPathMatcher。
メソッドの詳細
matches
public boolean matches(org.springframework.messaging.Message<?> message)
インターフェースからコピーされた説明:MessageMatcherMessageが一致する場合は true、それ以外の場合は false を返します- 次で指定:
- インターフェース
MessageMatcher<java.lang.Object>のmatches - パラメーター:
message- 一致するMessage- 戻り値:
Messageが一致する場合は true、そうでない場合は false
extractPathVariables
public java.util.Map<java.lang.String,java.lang.String> extractPathVariables(org.springframework.messaging.Message<?> message)
getMessageTypeMatcher
public MessageMatcher<java.lang.Object> getMessageTypeMatcher()
toString
public java.lang.String toString()
- オーバーライド:
- クラス
java.lang.ObjectのtoString
createSubscribeMatcher
public static SimpDestinationMessageMatcher createSubscribeMatcher(java.lang.String pattern, org.springframework.util.PathMatcher matcher)
指定されたパターン
SimpMessageType.SUBSCRIBEとPathMatcherで新しいインスタンスを作成します。- パラメーター:
pattern- 使用するパターンmatcher- 使用するPathMatcher。
createMessageMatcher
public static SimpDestinationMessageMatcher createMessageMatcher(java.lang.String pattern, org.springframework.util.PathMatcher matcher)
指定されたパターン
SimpMessageType.MESSAGEとPathMatcherで新しいインスタンスを作成します。- パラメーター:
pattern- 使用するパターンmatcher- 使用するPathMatcher。