public class ServerEndpointExporter extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.context.ApplicationContextAware
ServerEndpointConfig and registers
with the standard Java WebSocket runtime. Also detects beans annotated with
ServerEndpoint and registers them as well. Although not required, it is likely
annotated endpoints should have their configurator property set to
SpringConfigurator.
When this class is used, by declaring it in Spring configuration, it should be
possible to turn off a Servlet container's scan for WebSocket endpoints. This can be
done with the help of the <absolute-ordering> element in web.xml.
ServerEndpointRegistration,
SpringConfigurator,
ServletServerContainerFactoryBean| Constructor and Description |
|---|
ServerEndpointExporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected javax.websocket.server.ServerContainer |
getServerContainer() |
Object |
postProcessAfterInitialization(Object bean,
String beanName) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
void |
setAnnotatedEndpointClasses(Class<?>... annotatedEndpointClasses)
Explicitly list annotated endpoint types that should be registered on startup.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public void setAnnotatedEndpointClasses(Class<?>... annotatedEndpointClasses)
annotatedEndpointClasses - ServerEndpoint-annotated typespublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwareprotected javax.websocket.server.ServerContainer getServerContainer()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionpublic Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansException