public class EndpointConnectionManager extends ConnectionManagerSupport implements BeanFactoryAware
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.AnnotatedEndpointConnectionManagerlogger| Constructor and Description |
|---|
EndpointConnectionManager(Class<? extends javax.websocket.Endpoint> endpointClass,
String uriTemplate,
Object... uriVars) |
EndpointConnectionManager(javax.websocket.Endpoint endpoint,
String uriTemplate,
Object... uriVariables) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeConnection() |
javax.websocket.WebSocketContainer |
getWebSocketContainer() |
protected boolean |
isConnected() |
protected void |
openConnection() |
void |
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
void |
setConfigurator(javax.websocket.ClientEndpointConfig.Configurator configurator) |
void |
setDecoders(List<Class<? extends javax.websocket.Decoder>> decoders) |
void |
setEncoders(List<Class<? extends javax.websocket.Encoder>> encoders) |
void |
setExtensions(javax.websocket.Extension... extensions) |
void |
setSubProtocols(String... subprotocols) |
void |
setWebSocketContainer(javax.websocket.WebSocketContainer webSocketContainer) |
getPhase, getUri, isAutoStartup, isRunning, setAutoStartup, setPhase, start, startInternal, stop, stop, stopInternalpublic EndpointConnectionManager(javax.websocket.Endpoint endpoint,
String uriTemplate,
Object... uriVariables)
public void setSubProtocols(String... subprotocols)
public void setExtensions(javax.websocket.Extension... extensions)
public void setConfigurator(javax.websocket.ClientEndpointConfig.Configurator configurator)
public void setWebSocketContainer(javax.websocket.WebSocketContainer webSocketContainer)
public javax.websocket.WebSocketContainer getWebSocketContainer()
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
BeanFactoryAwareInvoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet() or a custom init-method.
setBeanFactory in interface BeanFactoryAwarebeanFactory - owning BeanFactory (never null).
The bean can immediately call methods on the factory.BeansException - in case of initialization errorsBeanInitializationExceptionprotected void openConnection()
throws Exception
openConnection in class ConnectionManagerSupportExceptionprotected void closeConnection()
throws Exception
closeConnection in class ConnectionManagerSupportExceptionprotected boolean isConnected()
isConnected in class ConnectionManagerSupport