Class AnnotatedEndpointConnectionManager
java.lang.Object
org.springframework.web.socket.client.ConnectionManagerSupport
org.springframework.web.socket.client.standard.AnnotatedEndpointConnectionManager
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- Lifecycle,- Phased,- SmartLifecycle
public class AnnotatedEndpointConnectionManager
extends ConnectionManagerSupport
implements BeanFactoryAware
A WebSocket connection manager that is given a URI, a
 
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.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Field SummaryFields inherited from class org.springframework.web.socket.client.ConnectionManagerSupportloggerFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructorsConstructorDescriptionAnnotatedEndpointConnectionManager(Class<?> endpointClass, String uriTemplate, Object... uriVariables) AnnotatedEndpointConnectionManager(Object endpoint, String uriTemplate, Object... uriVariables) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidReturn the configuredTaskExecutor.protected booleanprotected voidvoidsetBeanFactory(BeanFactory beanFactory) Callback that supplies the owning factory to a bean instance.voidsetTaskExecutor(TaskExecutor taskExecutor) Set aTaskExecutorto use to open the connection.voidsetWebSocketContainer(WebSocketContainer webSocketContainer) Methods inherited from class org.springframework.web.socket.client.ConnectionManagerSupportgetPhase, getUri, isAutoStartup, isRunning, setAutoStartup, setPhase, start, startInternal, stop, stop, stopInternal
- 
Constructor Details- 
AnnotatedEndpointConnectionManager
- 
AnnotatedEndpointConnectionManager
 
- 
- 
Method Details- 
setWebSocketContainer
- 
getWebSocketContainer
- 
setBeanFactoryDescription copied from interface:BeanFactoryAwareCallback that supplies the owning factory to a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean.afterPropertiesSet()or a custom init-method.- Specified by:
- setBeanFactoryin interface- BeanFactoryAware
- Parameters:
- beanFactory- owning BeanFactory (never- null). The bean can immediately call methods on the factory.
- Throws:
- BeansException- in case of initialization errors
- See Also:
 
- 
setTaskExecutorSet aTaskExecutorto use to open the connection. By defaultSimpleAsyncTaskExecutoris used.
- 
getTaskExecutorReturn the configuredTaskExecutor.
- 
openConnectionprotected void openConnection()- Specified by:
- openConnectionin class- ConnectionManagerSupport
 
- 
closeConnection- Specified by:
- closeConnectionin class- ConnectionManagerSupport
- Throws:
- Exception
 
- 
isConnectedprotected boolean isConnected()- Specified by:
- isConnectedin class- ConnectionManagerSupport
 
 
-