spring-framework / org.springframework.web.socket.server.standard / ServletServerContainerFactoryBean / <init>

<init>

ServletServerContainerFactoryBean()

A FactoryBean for configuring javax.websocket.server.ServerContainer. Since there is usually only one ServerContainer instance accessible under a well-known javax.servlet.ServletContext attribute, simply declaring this FactoryBean and using its setters allows for configuring the ServerContainer through Spring configuration.

This is useful even if the ServerContainer is not injected into any other bean within the Spring application context. For example, an application can configure a org.springframework.web.socket.server.support.DefaultHandshakeHandler, a org.springframework.web.socket.sockjs.SockJsService, or ServerEndpointExporter, and separately declare this FactoryBean in order to customize the properties of the (one and only) ServerContainer instance.

Author
Rossen Stoyanchev

Author
Sam Brannen

Since
4.0