public class AnnotatedEndpointConnectionManager extends ConnectionManagerSupport implements BeanFactoryAware
ClientEndpoint
EE アノテーション付きエンドポイント) を指定された WebSocket 接続マネージャーは、ConnectionManagerSupport.start()
および ConnectionManagerSupport.stop()
メソッドを介して WebSocket サーバーに接続します。ConnectionManagerSupport.setAutoStartup(boolean)
が true
に設定されている場合、これは Spring ApplicationContext がリフレッシュされたときに自動的に実行されます。logger
DEFAULT_PHASE
コンストラクターと説明 |
---|
AnnotatedEndpointConnectionManager(ClassSE<?> endpointClass, StringSE uriTemplate, ObjectSE... uriVariables) |
AnnotatedEndpointConnectionManager(ObjectSE endpoint, StringSE uriTemplate, ObjectSE... uriVariables) |
修飾子と型 | メソッドと説明 |
---|---|
protected void | closeConnection() |
TaskExecutor | getTaskExecutor() 設定された TaskExecutor を返します。 |
WebSocketContainerEE | getWebSocketContainer() |
protected boolean | isConnected() |
protected void | openConnection() |
void | setBeanFactory(BeanFactory beanFactory) 所有ファクトリを Bean インスタンスに提供するコールバック。 |
void | setTaskExecutor(TaskExecutor taskExecutor) 接続を開くために使用する TaskExecutor を設定します。 |
void | setWebSocketContainer(WebSocketContainerEE webSocketContainer) |
getPhase, getUri, isAutoStartup, isRunning, setAutoStartup, setPhase, start, startInternal, stop, stop, stopInternal
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public AnnotatedEndpointConnectionManager(ObjectSE endpoint, StringSE uriTemplate, ObjectSE... uriVariables)
public void setWebSocketContainer(WebSocketContainerEE webSocketContainer)
public WebSocketContainerEE getWebSocketContainer()
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
BeanFactoryAware
通常の Bean プロパティの設定後、ただし InitializingBean.afterPropertiesSet()
またはカスタム init-method などの初期化コールバックの前に呼び出されます。
BeanFactoryAware
の setBeanFactory
beanFactory
- 所有 BeanFactory(非 null
)。Bean は、ファクトリのメソッドをすぐに呼び出すことができます。BeansException
- 初期化エラーの場合 BeanInitializationException
public void setTaskExecutor(TaskExecutor taskExecutor)
TaskExecutor
を設定します。デフォルトでは SimpleAsyncTaskExecutor
が使用されます。public TaskExecutor getTaskExecutor()
TaskExecutor
を返します。protected void openConnection()
ConnectionManagerSupport
の openConnection
protected void closeConnection() throws ExceptionSE
ConnectionManagerSupport
の closeConnection
ExceptionSE
protected boolean isConnected()
ConnectionManagerSupport
の isConnected