public class AnnotatedEndpointConnectionManager extends ConnectionManagerSupport implements org.springframework.beans.factory.BeanFactoryAware
ClientEndpoint
-annotated endpoint, connects to a
WebSocket server through the ConnectionManagerSupport.start()
and ConnectionManagerSupport.stop()
methods.
If ConnectionManagerSupport.setAutoStartup(boolean)
is set to true
this will be
done automatically when the Spring ApplicationContext is refreshed.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() |
org.springframework.core.task.TaskExecutor |
getTaskExecutor()
Return the configured
TaskExecutor . |
WebSocketContainer |
getWebSocketContainer() |
protected boolean |
isConnected() |
protected void |
openConnection() |
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, stopInternal
public 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.BeanFactoryAware
org.springframework.beans.BeansException
public 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
.protected void openConnection()
openConnection
in class ConnectionManagerSupport
protected void closeConnection() throws Exception
closeConnection
in class ConnectionManagerSupport
Exception
protected boolean isConnected()
isConnected
in class ConnectionManagerSupport