public class AnnotatedEndpointConnectionManager extends ConnectionManagerSupport implements org.springframework.beans.factory.BeanFactoryAware
connection manager that connects
to the server via WebSocketContainer and handles the session with an
@ClientEndpoint endpoint.logger| Constructor and Description |
|---|
AnnotatedEndpointConnectionManager(Class<?> endpointClass,
String uriTemplate,
Object... uriVariables) |
AnnotatedEndpointConnectionManager(Object endpoint,
String uriTemplate,
Object... uriVariables) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeConnection()
Subclasses implement this to close the connection.
|
org.springframework.core.task.TaskExecutor |
getTaskExecutor()
Return the configured
TaskExecutor. |
WebSocketContainer |
getWebSocketContainer() |
boolean |
isConnected()
Whether the connection is open/
true or closed/false. |
protected void |
openConnection()
Subclasses implement this to actually establish the connection.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Set a
TaskExecutor to use to open the connection. |
void |
setWebSocketContainer(WebSocketContainer webSocketContainer) |
getPhase, getUri, isAutoStartup, isRunning, setAutoStartup, setPhase, start, startInternal, stop, stop, stopInternalpublic AnnotatedEndpointConnectionManager(Object endpoint, String uriTemplate, Object... uriVariables)
public void setWebSocketContainer(WebSocketContainer webSocketContainer)
public WebSocketContainer getWebSocketContainer()
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
TaskExecutor to use to open the connection.
By default SimpleAsyncTaskExecutor is used.public org.springframework.core.task.TaskExecutor getTaskExecutor()
TaskExecutor.public boolean isConnected()
ConnectionManagerSupporttrue or closed/false.isConnected in class ConnectionManagerSupportprotected void openConnection()
ConnectionManagerSupportopenConnection in class ConnectionManagerSupportprotected void closeConnection()
throws Exception
ConnectionManagerSupportcloseConnection in class ConnectionManagerSupportException