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