クラス 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
  • フィールドの詳細

  • コンストラクターの詳細

    • SimpDestinationMessageMatcher

      public SimpDestinationMessageMatcher(StringSE pattern)

      指定されたパターン、null SimpMessageType (すべての型に一致)、およびデフォルトのコンストラクターから作成された AntPathMatcher を使用して、新しいインスタンスを作成します。

      次のルールを使用しているにもかかわらず、マッピングは宛先と一致します。

      • ? 1 文字に一致
      • * 0 個以上の文字に一致します
      • ** パスの 0 個以上の「ディレクトリ」に一致します

      いくつかの例:

      • com/t?st.jsp - com/test に一致しますが、com/tast または com/txst にも一致します
      • com/*suffix - com ディレクトリの suffix で終わるすべてのファイルに一致します
      • com/&#42;&#42;/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

      public MapSE<StringSE,StringSE> extractPathVariables(org.springframework.messaging.Message<?> message)
    • getMessageTypeMatcher

      public MessageMatcher<ObjectSE> getMessageTypeMatcher()
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString 
    • 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