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