public class DefaultSimpUserRegistry extends java.lang.Object implements SimpUserRegistry, SmartApplicationListener
AbstractSubProtocolEvent アプリケーションコンテキストイベントに依存して、接続ユーザーとそのサブスクリプションを追跡する SimpUserRegistry のデフォルト実装。HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| コンストラクターと説明 |
|---|
DefaultSimpUserRegistry() |
| 修飾子と型 | メソッドと説明 |
|---|---|
java.util.Set<SimpSubscription> | findSubscriptions(SimpSubscriptionMatcher matcher) 指定されたマッチャーでサブスクリプションを検索します。 |
int | getOrder() 同じイベントの一連のリスナーで、このリスナーの順序を決定します。 |
SimpUser | getUser(java.lang.String userName) 指定された名前のユーザーを取得します。 |
int | getUserCount() 接続されているすべてのユーザーの数を返します。 |
java.util.Set<SimpUser> | getUsers() 接続されているすべてのユーザーのスナップショットを返します。 |
void | onApplicationEvent(ApplicationEvent event) アプリケーションイベントを処理します。 |
void | setOrder(int order) このレジストリの順序値を指定します。 |
boolean | supportsEventType(java.lang.Class<? extends ApplicationEvent> eventType) このリスナーが特定のイベント型を実際にサポートしているかどうかを判断します。 |
boolean | supportsSourceType(java.lang.Class<?> sourceType) このリスナーが特定のソース型を実際にサポートしているかどうかを判断します。 |
java.lang.String | toString() |
public void setOrder(int order)
デフォルトは Ordered.LOWEST_PRECEDENCE です。
public int getOrder()
SmartApplicationListener デフォルトの実装は Ordered.LOWEST_PRECEDENCE を返します。
SmartApplicationListener 内の getOrder Ordered 内の getOrder Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCEpublic boolean supportsEventType(java.lang.Class<? extends ApplicationEvent> eventType)
SmartApplicationListenerSmartApplicationListener 内の supportsEventType eventType - イベント型 (非 null)public void onApplicationEvent(ApplicationEvent event)
ApplicationListenerApplicationListener<ApplicationEvent> 内の onApplicationEvent event - 応答するイベント public boolean supportsSourceType(@Nullable java.lang.Class<?> sourceType)
SmartApplicationListener デフォルトの実装は、常に true を返します。
SmartApplicationListener 内の supportsSourceType sourceType - ソース型、またはソースがない場合は null @Nullable public SimpUser getUser(java.lang.String userName)
SimpUserRegistrySimpUserRegistry 内の getUser userName - 検索するユーザーの名前 null public java.util.Set<SimpUser> getUsers()
SimpUserRegistry返されるセットはコピーであり、それ以上の変更は反映されません。
SimpUserRegistry 内の getUsers public int getUserCount()
SimpUserRegistrySimpUserRegistry 内の getUserCount public java.util.Set<SimpSubscription> findSubscriptions(SimpSubscriptionMatcher matcher)
SimpUserRegistrySimpUserRegistry 内の findSubscriptions matcher - 使用するマッチャー public java.lang.String toString()
java.lang.Object の toString